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

Global Header/Footer: Hide the arrow emoji for screen reader users #454

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Sep 25, 2023

Fixes #453 — The arrows are primarily decorative, and screen readers can be overly verbose when encountering special characters. This brings over the function from WordPress/wporg-parent-2021#94 to wrap the arrows in aria-hidden.

Screenshot 2023-09-25 at 12 53 05 PM

To test

  • View source/inspect a list item with an arrow
  • It should be wrapped in a span

Or

  • Try using a screen reader, navigate through to the menu items with arrows
  • Only the text should be read, not the arrows

The arrows are primarily decorative, and screen readers can be overly verbose when encountering special characters.

Fixes #453.
@ryelle ryelle added this to the Navigation Iteration milestone Sep 25, 2023
@ryelle ryelle self-assigned this Sep 25, 2023
@ryelle ryelle removed this from the Navigation Iteration milestone Sep 25, 2023
@ryelle ryelle added the Accessibility Issues related to keyboard navigation, screen readers, etc label Sep 25, 2023
Copy link
Contributor

@StevenDufresne StevenDufresne left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ryelle ryelle merged commit ee5d04e into trunk Oct 2, 2023
@ryelle ryelle deleted the add/header-footer-aria-on-arrows branch October 2, 2023 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc [Block] Header & Footer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent screen readers from reading the arrow emoji in menu items
2 participants