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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ <h2 class="m24-c-menu-item-title">{{ ftl('navigation-refresh-mdn-plus') }}</h2>
</li>
<li>
<section class="m24-c-menu-item mzp-has-icon">
<a class="m24-c-menu-item-link" href="https://fakespot.com/?{{ utm_params }}" data-link-text="Fakespot" data-link-position="topnav - products">
<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>
Comment on lines +58 to +61
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?)

</a>
</section>
</li>
Expand Down
Loading