ROX-33675: Use screenReaderText prop for empty Th elements#19521
ROX-33675: Use screenReaderText prop for empty Th elements#19521pedrottimark merged 3 commits intomasterfrom
Conversation
|
Images are ready for the commit at b9a90c5. To use with deploy scripts, first |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19521 +/- ##
==========================================
+ Coverage 49.23% 49.24% +0.01%
==========================================
Files 2727 2727
Lines 205764 205787 +23
==========================================
+ Hits 101306 101350 +44
+ Misses 96920 96902 -18
+ Partials 7538 7535 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@pedrottimark: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
Replace work-around for accessibility with prop supported in PatternFly 5.3 that I failed to do before PatternFly 6 upgrade. Better late than never.
patternfly/patternfly-react#10152
https://www.patternfly.org/components/table#th
Analysis
Find in Files
pf-v6-screen-readerin cypress folder has 5 results in 5 files
Selectors are valid because work-around rendered same HTML as
Thelement withscreenReaderTextprop.in src folder has 37 results in 32 files
in eslint-plugins folder has 3 results in 2 files:
pluginAccessibility.js file has
'Th-screenReaderText'rule forscreenReaderTextprop.pluginPatternFly.js file has
'Td-dataLabel-Th-text'rule with work-around and commented-out code forscreenReaderTextprop.Solution
Use typescript-eslint playground for rule to verify replacement of work-arounnd.
https://typescript-eslint.io/play/#ts=5.9.3&showAST=es&fileType=.tsx
Edit pluginPatternFly.js file.
Replace work-around with commented-out assignment of
hasValueAsScreenReaderTextcondition in'Td-dataLabel-Th-text'rule.Add
'no-span-pf-v6-screen-reader'rule.Replace work-around in src files.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run tscin ui/apps/platform folder.npm run lint:fast-devin ui/apps/platform folder.Before changes, see presence of errors.
After changes, see absence of errors.
npm run startin ui/apps/platform folder with staging demo as central.Manual testing
Visit /main/vulnerabilities/workload-cves
Before and after changes, see markup in Elements pane of browser: