-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Austenem/Accessibility updates #3648
base: main
Are you sure you want to change the base?
Conversation
@@ -72,12 +74,13 @@ export default function CollapsibleDetailPageSection({ | |||
}} | |||
ml="auto" | |||
className="accordion-section-action" | |||
sx={{ position: 'absolute', right: 0, top: 0 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -69,7 +69,7 @@ function TooltipToggleButton({ | |||
|
|||
return ( | |||
<Tooltip title={tooltipTitle}> | |||
<span> | |||
<span role="tooltip"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is the most appropriate role for the wrapper of the tooltip anchor, since the MDN example has the tooltip
role on the div with the tooltip contents, rather than the anchor: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tooltip_role
Maybe we could use useId
to generate a unique tooltip ID, pass it to Tooltip
as the id
, and use the aria-describedby
prop on the span or button instead?
Summary
Resolves accessibility issues related to arias and interactive controls throughout the portal.
Design Documentation/Original Tickets
CAT-1027: Certain ARIA roles must contain particular children
CAT-1056: Ensure interactive controls are not nested
CAT-1058: Elements must only use permitted ARIA attributes
CAT-1059: Ensure role attribute has an appropriate value for the element
Testing
Tested that each issue was resolved using Axe Devtools on all portal pages.
Screenshots/Video
No significant visual/behavioral changes should be present. One exception is the placeholder text added to the search bar on search pages, as per discussion with @tsliaw.
Checklist
CHANGELOG-your-feature-name-here.md
is present in the root directory, describing the change(s) in full sentences.Additional Notes
Two instances of CAT-1056 (Ensure interactive controls are not nested) could not be resolved.
The first is present on the homepage and is the result of the Hero component used there - the interactive controls are inherent to the design, and as the links present in the Hero are available in multiple other locations, this will not be altered.
The second is present on multiple pages and could not be resolved as it is inherent to the MUI Checkbox component (related thread). This issue is present on the following pages that use this component: