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

add product pronunciation hint for screen readers (fix #15530) #15847

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wen-2018
Copy link
Collaborator

One-line summary

This PR adds product pronunciation hint for "Fakespot" for screen readers.

Significant changes and points to review

Navigation product menu.

Issue / Bugzilla link

#15530

Testing

I have run this through VoiceOver.

@wen-2018 wen-2018 requested a review from a team as a code owner January 10, 2025 20:21
@wen-2018 wen-2018 added Needs Review Awaiting code review a11y Issues related to accessibility labels Jan 10, 2025
Comment on lines +58 to +61
<a class="m24-c-menu-item-link" href="https://fakespot.com/?{{ utm_params }}" data-link-text="Fakespot" data-link-position="topnav - products" aria-labelledby="fakespot">
<img loading="lazy" src="{{ static('img/logos/fakespot/logo-blue.svg') }}" class="m24-c-menu-item-icon" width="32" height="32" alt="">
<h2 class="m24-c-menu-item-title">{{ ftl('navigation-refresh-fakespot') }}</h2>
<span id="fakespot" aria-label="fake spot"></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Lovely!

Just a quick note, another prominent occurrence for "Fakespot" is home launchpad, and products.landing page. In case the same treatment is repeated for those instances, it would probably reuse the same id target. Maybe make the id more explicit in a way to tell a bit about what function it has (without having to add explanatory comments et al.), and to be more unique in case more places refer to it over time?

(NB: Normally it would not be too much different to have an element labelledby with a reference that has no content and just its own aria-label — in which case it would be the same as defining the aria-label right away. But this reference allows for more occurrences to be labelledby with it, which was probably the plan?)

Choose a reason for hiding this comment

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

Lovely!

Just a quick note, another prominent occurrence for "Fakespot" is home launchpad, and products.landing page. In case the same treatment is repeated for those instances, it would probably reuse the same id target. Maybe make the id more explicit in a way to tell a bit about what function it has (without having to add explanatory comments et al.), and to be more unique in case more places refer to it over time?

(NB: Normally it would not be too much different to have an element labelledby with a reference that has no content and just its own aria-label — in which case it would be the same as defining the aria-label right away. But this reference allows for more occurrences to be labelledby with it, which was probably the plan?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Issues related to accessibility Needs Review Awaiting code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants