Implementing aria-label Accessibility in Links #3038
Replies: 5 comments
-
Worth checking with authors if |
Beta Was this translation helpful? Give feedback.
-
I'm a bit surprised to see this already in the making, as it's part of a larger conversation we're having to address all accessibility compliance issues. This story has been marked as a sort of parent for all While I don't completely disagree with the approach, I'd like to get a bit more time to think through the use-cases:
For Lastly, although this would be a great step forward, it would be a mammoth task for GWP to go back and re-author all links to contain this label. We've discussed that we might try to isolate some use-cases where we could infer the label from headings/eyebrow texts in the block. All in all, I'd suggest we don't rush into this and first ensure we're taking the E2E flow into account. CC: @narcis-radu |
Beta Was this translation helpful? Give feedback.
-
On top of what @overmyheadandbody mentioned, I would not recommend the query parameter approach. This would be a bit of a new authoring pattern. Currently we add features to links via I think something similar to how we handle alt text for SVG's, similar to what @overmyheadandbody mentioned would be a better approach. This is also net new, meaning lots of reauthoring to get existing pages updated. We probably need GWP's input. This could be a large ask. Another approach could be to associate the link aria label with a preceding heading tag (closest). That does present some obsticals as some blocks use a tag for the eyebrow text and the heading. This would help solve for the need to reauthor pages though. |
Beta Was this translation helpful? Give feedback.
-
I've set up a showcase page with a few alternatives that would be a bit more authoring/localization-friendly. I've reached out to GWP to get some input on what would best work for them, as they will have to deal with making all of the updates. |
Beta Was this translation helpful? Give feedback.
-
@overmyheadandbody Keep us posted on the update from GWP, after looking at the page, |
Beta Was this translation helpful? Give feedback.
-
Hi Team,
I'm working on adding a11y to all links.
JIRA: MWPW-157350
Context: When using Chrome on Windows with an NVDA screen reader, users navigate to the "Buy Now" and "Learn More" links on the pages. Links currently lack descriptive and distinctive text, which affects their clarity and usability for screen reader users.
Proposed Solution:
We need to improve the accessibility of our links (a11y) by creating a method to dynamically add the
aria-label
attribute. The proposed solution includes the following steps:label_text
parameter in the URL for any links where they want to enable accessibility features. For example:https://www.adobe.com/photoshop.html?label_text=Buy Now about photoshop
Processing Links in
decorateLinks
: Themilo utils
will be responsible for processing all links within thedecorateLinks
function. It will check for the presence of thelabel_text
parameter in the URL.Setting the
aria-label
: If thelabel_text
parameter exists, the function will:aria-label
for the respective anchor tag.label_text
parameter from the URL to avoid clutter and ensure clean URLs.href
to reflect the new URL structure without thelabel_text
parameter.Implementation Example:
Here's a code snippet for clarity:
Compare: stage...sivasaadobe/milo
Benefits:
We'd like to gather feedback on potential concerns about this proposed solution, specifically the implementation approach and how it might be integrated into our existing code base.
cc @salonijain3 @narcis-radu @dstrong23 @aishwaryamathuria @mokimo @suhjainadobe @Ruchika4
Beta Was this translation helpful? Give feedback.
All reactions