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

Feat/accessibility fixes and improvements #451

Merged
merged 23 commits into from
Feb 22, 2024

Conversation

ChristiaanScheermeijer
Copy link
Collaborator

@ChristiaanScheermeijer ChristiaanScheermeijer commented Feb 8, 2024

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.

  • fix(a11y): prevent double ids on inputs by requiring a name
  • feat(a11y): apply aria-modal attribute and move header landmark
  • feat(a11y): update button role and html structure of account and player pages
  • feat(a11y): add correct text markups and aria attributes
  • 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 & 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

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.

image

Support keyboard interaction for many components

The following components have been optimized for keyboard navigation:

  • Shelves (TileDock)
  • TileGrid
  • VideoList & VideoListItem
  • Radio

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.

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.

image

Related WCAG 2.1 (AA) requirements

  • WCAG 1.3.1 Info and Relationships
  • WCAG 1.3.2 Meaningful Sequence
  • WCAG 1.4.3 Contrast Minimum
  • WCAG 1.4.5 Images of Text
  • WCAG 1.4.10 Reflow
  • WCAG 1.4.11 Non-Text Contrast
  • WCAG 2.4.7 Focus Visible
  • WCAG 2.5.3 Label in Name
  • WCAG 3.1.2 Language of Parts
  • WCAG 3.2.1 On Focus
  • WCAG 3.2.4 Consistent Identification
  • WCAG 4.1.3 Status Messages

Copy link

github-actions bot commented Feb 8, 2024

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

@ChristiaanScheermeijer
Copy link
Collaborator Author

Needs rebase (after approving #450)

dbudzins
dbudzins previously approved these changes Feb 19, 2024
Copy link
Contributor

@dbudzins dbudzins left a 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!

@AntonLantukh
Copy link
Collaborator

AntonLantukh commented Feb 21, 2024

Looks like the "Related films" header has additional margin now on the mobile devices:

Screenshot 2024-02-21 at 10 25 44

@AntonLantukh
Copy link
Collaborator

The footer is overlapping the config info:

Screenshot 2024-02-21 at 10 52 45

@ChristiaanScheermeijer
Copy link
Collaborator Author

Looks like the "Related films" header has additional margin now on the mobile devices:

Screenshot 2024-02-21 at 10 25 44

This was broken indeed! Fixed it

@AntonLantukh
Copy link
Collaborator

Looks like menu items in the mobile sidebar are not outlined when tabbed (not sure if it is needed).

@ChristiaanScheermeijer
Copy link
Collaborator Author

@AntonLantukh I see this outline in the sidebar when tabbing:

image

Base automatically changed from feat/small-features-and-refactoring to develop February 21, 2024 18:03
@AntonLantukh AntonLantukh dismissed dbudzins’s stale review February 21, 2024 18:03

The base branch was changed.

langemike and others added 14 commits February 21, 2024 19:09
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]>
@ChristiaanScheermeijer ChristiaanScheermeijer force-pushed the feat/accessibility-fixes-and-improvements branch from cb0e964 to d9e5755 Compare February 21, 2024 18:10
@AntonLantukh AntonLantukh merged commit 6a291a7 into develop Feb 22, 2024
9 checks passed
@AntonLantukh AntonLantukh deleted the feat/accessibility-fixes-and-improvements branch February 22, 2024 13:18
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.

5 participants