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
Settings > "Edit" link lacks context (Accessibility) #6642
Comments
I deviated from the AC that recommeded to use This solution only works under the assumption that chaining the string in this order makes sense for all languages. That's not the case, e.g. for German you would put the "Edit" part at the end of the string. Therefore I recommend using 2 different strings / solutions for visual UI an screen readers. |
@derweili I think the idea in AC was to use the site-kit-wp/assets/js/modules/tagmanager/components/settings/SettingsView.js Lines 121 to 143 in a3fa8f3
|
@eugene-manuilov thank you for flagging that, I wasn't aware of that function. However, this would still produce an incorrect output for German language as the translation for "edit" needs to be capitalized for showing UI but not for reading with screenreader. So for Screenreaders the German translation should be: "Analytics bearbeiten" Therefore translating this as I doublechecked the code you mentioned and this existing code also has the same issue in the German translation. The "im" word should be capitalized. Although in this particular case you could discuss if capitalizing is really required, but in the case we discuss for this issue it's definitelly required. Therefore I would still go with the solution outlined in the IB. |
Apologies for the late reply, but this makes sense. In this case the appropriate option would be to use an I've filed a follow-up issue: #7072 |
Bug Description
The “Edit” link for each section in Settings (Search Console, Analytics, etc.) lacks context and should have some visually hidden text so it reads “Edit Search Console settings” instead of just “Edit”.
Steps to reproduce
Screenshots
Edit.link.lacks.context.and.should.be.a.button.mp4
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
“Edit<VisuallyHidden> [MODULE NAME] settings</VisuallyHidden>”
.Implementation Brief
assets/js/components/settings/SettingsActiveModule/Footer.js
Edit
string with aspan
and give it aaria-hidden
so the text is hidden for screen readers.site-kit-wp/assets/js/components/settings/SettingsActiveModule/Footer.js
Lines 210 to 221 in cac2239
<span>
add a<VisuallyHidden>
Element that contains the output for screen readers: "Edit [MODULE NAME] settings"sprintf
to inject the module name into the translation string, seesite-kit-wp/assets/js/components/settings/SettingsActiveModule/Footer.js
Lines 232 to 236 in cac2239
Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: