-
Notifications
You must be signed in to change notification settings - Fork 58
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
Feat/accessibility fixes and improvements #451
Feat/accessibility fixes and improvements #451
Conversation
Visit the preview URL for this PR (updated for commit 180f578): https://ottwebapp--pr451-feat-accessibility-f-m2ddpomu.web.app (expires Sat, 23 Mar 2024 11:35:34 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c198f8a3a199ba8747819f7f1e45cf602b777529 |
Needs rebase (after approving #450) |
cfedb98
to
91f0d2e
Compare
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.
Thank you for adding these features!
Looks like menu items in the mobile sidebar are not outlined when tabbed (not sure if it is needed). |
@AntonLantukh I see this outline in the sidebar when tabbing: |
fix(a11y): prevent double ids on inputs by requiring a name feat(a11y): apply aria-modal attribute and move header landmark (#48) feat(a11y): update button role and html structure of account and player pages (#47) feat(a11y): add correct text markups and aria attributes (#46) feat(home): add (geo) error message when all playlists are empty feat(a11y): add form error announcement feat(a11y): add solid header background color to ensure accessibility feat(a11y): implement aria-invalid and aria-described by to inputs on error feat(project): add google fonts from env vars feat: keyboard accessible LayoutGrid feat: optimize featured shelf slider for accessibility feat(a11y): accessible sidebar & <main> landmark feat(a11y): enhance dialog and modals accessibility fix(a11y): alt text for images for EPG fix(a11y): empty alt for image because of adjacent text alternative fix(a11y): fix arrow keys for offer radio buttons fix(a11y): skiplink first element feat(a11y): improve html structure for VideoListItem fix(e2e): cardgrid card navigation feat(a11y): apply lang attribute to custom fields feat(a11y): accessible focus outline
Co-authored-by: Mike van Veenhuijzen <[email protected]>
Co-authored-by: Mike van Veenhuijzen <[email protected]>
cb0e964
to
d9e5755
Compare
Description
This branch is rebased on #450 and contains a lot of accessibility improvements and fixes.
Most of the accessibility features are squashed into the first commit. Fixes and improvements for these features are added later. We should squash this, but it might help to do that after reviewing.
Most notable changes
Focus outline when using the tab key to navigate
When keyboard users navigate the site, the
is-tabbing
class name is added to the body element. This causes interactive elements to show an outline when being focussed.Support keyboard interaction for many components
The following components have been optimized for keyboard navigation:
Modals & drawer as dialog
When a modal or drawer opens, the rest of the page becomes inert, and the focus stays within the opened dialog. The first interactive element is automatically focussed, and the focus is automatically returned to the originating element when the dialog is closed.
Contrast ratio fixes
The biggest contrast ratio issue was coming from the navbar when having a transparent background. The cover image on the video detail page could contain very light colors, making the navbar menu items badly visible. We have reduced the opacity of the menu items and added a fade over the cover image.
Screenreader announcements
We've found that on many occasions, it was not clear for screenreader users that a certain action had failed or succeeded. For example, when updating your account, there is no visual indication that the update has been applied. Instead of adding a form message (because some of these updates originate from forms within modals), we added an AriaAnnouncerProvider, which can provide feedback to screenreader users when the action is complete.
Empty homepage message
When GEO restricts your content and browsing from a restricted country, the home page will be empty. When this happens, we have added a generic message so that the user is aware that no more content will be shown on the site.
Related WCAG 2.1 (AA) requirements