
1
Has anyone used aria-label in their emails before?
Hello Everyone!
Has anyone ever used aria-label in their emails before? And if so, how?
ARIA14: Using aria-label to provide an invisible label where a visible label cannot be used
I had a client request to use them in an email and all I can find is documentation on using it on websites and forms.
Thank you so much!
VW
Yeah we've used aria attributes a fair bit. I'd say use them exactly how you would for the web however be aware that they will get stripped out in some email clients so don't rely on them. I believe Yahoo, AOL, GMX, Web.de all remove aria attributes, Outlook.com recently added support which is great.
Also when using things like
aria-labelledby
andaria-describedby
that rely on a matching ID, a lot of email clients will prefix the ID but not the aria so they will no longer match up.Mark,
That is awesome to know that you are using them!
Do you, by chance, have any examples to point to on how you are using them or how other people are using them?
I am very new to this and really don't know how to use them.
Thanks so much!
VW
Generally the advice is don't use aria, use semantic code instead. Unfortunately that's not always possible, so to fill the gaps we can use aria.
I'd suggest listening to your email with a screen reader (this in itself is a skill and can take a while to get used to) if anything doesn't make sense, first off try and fix it with regular text, if that's not possible you can use some aria.
Think of using the screen reader as a way of proofreading your content. i also think this should be part of everyone's QA process.
The majority of emails shouldn't need anything added, and it's always best to be sparing with it.
An equally important question, is why is the client asking?
The first rule of ARIA is don’t use ARIA – use the semantic element and role.
What is the element that needs a label?
They want to use it on all of their links ...