Accessibility [FastPass]: Fix settings general missing aria input labels #3542
Conversation
acf7f44 to
0fc8a97
Compare
0fc8a97 to
714d7ca
Compare
| inputProps={{ | ||
| 'aria-label': `option ${selectedValue}`, | ||
| }} |
There was a problem hiding this comment.
I am surprised this is not set by default. Can you elaborate what is the test failing here?
In any case, a solution would need the aria-label value to be translatable. Not sure if "option" is a good idea here either. AFAIU, screen readers already should understand this is part of a select.
There was a problem hiding this comment.
The FastPass error check for the NumRowsInput:
This error says it is missing an aria-label or aria-labelledby.
Also tried adding an aria-label prop here, still returns that same error above and additionally introduces need for "role" semantics
since adding them as props normally seems to just add to a MUI wrapper and not the input element itself I use inputProps
There was a problem hiding this comment.
Not sure if "option" is a good idea here either.
I agree, could use some ideas for a more fitting word than 'option'.
Option just seemed to be the a fitting enough catch all word for this select of preset numbers or a custom input (was between using "option" or "choice")
maybe something like
inputProps={{
'aria-label': t('translation|{{ value }} number of rows', { value: selectedValue }),
}}
AFAIU, screen readers already should understand this is part of a select.
An alternative method would be to try to wrap <MenuItem> inside some label and link it via an id= and aria-labelledby.
let me know if that is a good fit
There was a problem hiding this comment.
^^^
update: I was able to use the same method of adding an id to the name label that I am using elsewhere for the settings table. This now links and references the name label directly without need for "options" keyword or the like. These changes also pass the check
| variant="outlined" | ||
| inputProps={{ | ||
| ...params.inputProps, | ||
| 'aria-label': t('Timezone'), |
There was a problem hiding this comment.
Same comment as to why this is needed. Can you double check if MUI is not setting this and we're just missing some param?
There was a problem hiding this comment.
For the timezone select component the FastPass error prints as follows:
It does not look like MUI has any aria labels or labelled by here.
I have tried adding just the aira-label prop to <Autocomplete> and <TextField> individually, which still returns the same check error
I have also tried using aria-labelledby="cluster-selector-autocomplete" within <TextField>, since <Autocomplete> wraps it via renderInput prop, this also returns the same check error.
I opted for adding the aria label to the spread within renderInput method as per the docs https://mui.com/material-ui/api/autocomplete/#props
7751a21 to
bef08fb
Compare
d5e7d8c to
5d3b694
Compare
5d3b694 to
16fa8b1
Compare
a991647 to
cb41779
Compare
cb41779 to
afa4c93
Compare
|
if the changes for NameValueTable are good here I can remove the duplicate work in #3598 and it should be ready for final review |
There was a problem hiding this comment.
Pull Request Overview
This PR addresses accessibility issues by adding proper ARIA labels and using MUI Typography components for better screen reader support. The changes are focused on improving the accessibility compliance of various UI components, particularly for form controls and data display elements.
- Update MUI component patterns to use Typography wrapper for better semantic structure
- Add proper ARIA labels to form controls and input elements for screen reader accessibility
- Standardize label presentation across the application with consistent Typography components
frontend/src/components/common/TimezoneSelect/TimezoneSelect.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/common/NameValueTable/NameValueTable.tsx
Outdated
Show resolved
Hide resolved
afa4c93 to
035ae85
Compare
035ae85 to
4d1b87c
Compare
4d1b87c to
14f6624
Compare
14f6624 to
5c14630
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sniok, vyncent-t The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



Summary
This PR fixes accessibility related issues for the settings page, mainly just the issues found by FastPass on the
Generaltab.These changes are part of a larger accessibility compliance goal from ADO (not sure if linking is allowed).
Issues are found using FastPass automated checks, feel free to download the tool and doublecheck if interested.
Changes
These aria labels are now added to the settings view
Sort sidebar items alphabeticallymenu switchUse evict for pod deletionmenu switchNumber of rows for tablessource componentTimezone to display for datessource componentLanguageto use typography (was plain text before)Note
I have ran into issues with applying some aria attributes to the MUI components directly. I found that just attaching
aira-label/aira-labelledbyetc would only attach to the wrapper for the MUI component and not the input element itself. By adding theinputPropsfield we can attach aria labels to the actual input element.FastPass checks this solves
Issue for
Number of rows for tablesIssue for
Timezone to display for datesissue for
Sort sidebar items alphabeticallyissue for
Use evict for pod deletion