WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Is using aria-label to add alternative text - but no alt attribute still a WCAG fail?

for

From: Birkir R. Gunnarsson
Date: Aug 23, 2024 5:59AM


That is a good point.
ARIA is focused on accessibility, native HTML sometimes provides more
functionality and usability, which is one of the primary reasons for rule 1
of ARIA use, use native HTML over ARIA if it can do the job.
But again, it's not a WCAG fail, just general good practice, which can be
important to users.


Other scenarios that come to mind:
Using the <title> element to provide alt text for <svg> images, (if user
mouses over the image they see the content of the <title> element)
whereas if you use aria-label it will only benefit technologies that
process ARIA, mostly screen readers.
Using associated <label> element to provide accessible name for form
controls. It enlarges the touch target/clickable area (since clicking the
label text ocuses the input/checks the checkbox/selects the radio button),
whereas aria labeling attributes provide an accessible name, if used
correctly, but do not add this benefit.


On Fri, Aug 23, 2024 at 5:49 AM Mark Magennis < <EMAIL REMOVED> >
wrote:

> It's not a WCAG fail. It doesn't fail SC 1.1.1 Non-text Content if the
> aria-label provides a text alternative because that's all the SC requires.
> Is there any other SC you think it might fail?
>
> Mark
>
> > From: WebAIM-Forum < <EMAIL REMOVED> > on behalf of
> Jim Byrne Accessible Web Design < <EMAIL REMOVED> >
> Sent: Friday 23 August 2024 10:39
> To: WebAIM Discussion List < <EMAIL REMOVED> >
> Subject: [EXTERNAL] [WebAIM] Is using aria-label to add alternative text -
> but no alt attribute still a WCAG fail?
>
> Hi,
>
> I’m auditing a website that has many crucial image that do not have alt
> attributes. However, they all have aria-label. I see W3C says ‘"The alt
> attribute continues to be the preferred way to provide alternative text for
> images” - which is bit vague.
>
> In the past having no alt attribute would have been a fail - on the
> standards validation test alone. But the validation test is deprecated. So
> - the missing alt attribute no longer a fail?
>
> The ARIA docs say that Aria-label is designed to add additional
> information. I.e., not the primary information expected via the alt
> attribute.
>
> I’m assuming that having no alt attribute on an image is still a fail -
> even if ARIA is used to provide the alternative text - and specifically
> using aria-label instead of the alt attribute. Am I correct?
>
> Thanks,
> Jim
>
>
>
> 
>
> Multi-award-winning WCAG 2.2 AA Accessibility Auditing and Accessibility
> Consultant
>
> Web:
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjimbyrne.co.uk%2F&data=05%7C02%7CMark.Magennis%40skillsoft.com%7C173a3bf1c186404f9c5f08dcc3578f03%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638600028068587499%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=0mMBC9Tg34UpDzuqhhygw7Zfc3a6NskgLNK9TOoFKxY%3D&reserved=0
> <https://jimbyrne.co.uk/>
>
> Jim Byrne is one of the UK’s most experienced practitioners in the area of
> accessible digital design.
>
> Jim provided feedback during the development of WCAG 2 (the de facto
> accessibility guidelines used by governments across the world). He is the
> author of a number of technical books, training courses and accessibility
> guides. Jim was a winner of the equal access category of the Global
> Bangemann Challenge.
>
> > > https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist.webaim.org%2F&data=05%7C02%7CMark.Magennis%40skillsoft.com%7C173a3bf1c186404f9c5f08dcc3578f03%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638600028068597594%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=mdFfkkvj3v4umEvN%2Bl3Ux1kz0v8oGQZkf8px6sLJl5E%3D&reserved=0
> <http://list.webaim.org/>;
> List archives at
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwebaim.org%2Fdiscussion%2Farchives&data=05%7C02%7CMark.Magennis%40skillsoft.com%7C173a3bf1c186404f9c5f08dcc3578f03%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638600028068600722%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=rxZMroVee1Gx1%2Ff1ew6vUJf04BQa8r9VNAy0YekS5KI%3D&reserved=0
> <http://webaim.org/discussion/archives>;
> > > > > >


--
Work hard. Have fun. Make history.