Skip to content
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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

austenem
Copy link
Collaborator

@austenem austenem commented Dec 16, 2024

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.

Screenshot 2024-12-16 at 12 24 58 PM

Checklist

  • Code follows the project's coding standards
    • Lint checks pass locally
    • New CHANGELOG-your-feature-name-here.md is present in the root directory, describing the change(s) in full sentences.
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • Any relevant documentation in JIRA/Confluence has been updated to reflect the new feature
  • Any new functionalities have appropriate analytics functionalities added

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:

  • All search pages
  • Workspaces page
  • Organ detail page
  • Workspace detail page

@@ -72,12 +74,13 @@ export default function CollapsibleDetailPageSection({
}}
ml="auto"
className="accordion-section-action"
sx={{ position: 'absolute', right: 0, top: 0 }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a creative workaround to the issue!

A minor nitpick:

  • the actions are very slightly misaligned relative to the accordion heading; could we adjust the top value accordingly?
    • Local:
      image
    • Prod:
      image

Behaviorally it matches, so this should be just a minor top adjustment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Should be aligned now:
Screenshot 2024-12-20 at 12 09 11 PM

@@ -69,7 +69,7 @@ function TooltipToggleButton({

return (
<Tooltip title={tooltipTitle}>
<span>
<span role="tooltip">
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants