RE: Placeholder attribute an accessible name?

Hi,
Just to clarify one point, the AccName algorithm will use placeholder as a fallback because it must, but it is never good practice to rely on this as a valid naming mechanism alone because it will cause other accessibility issues to occur.

So, even though the AccName algorithm will use placeholder as a fallback, it is actually not an acceptable naming mechanism for people to implement by itself.

Hopefully this helps a bit. 😊




Bryan Garaventa
Principal Accessibility Architect
Level Access, Inc.
Bryan.Garaventa@LevelAccess.com<mailto:Bryan.Garaventa@LevelAccess.com>
415.624.2709 (o)
www.LevelAccess.com<http://www.LevelAccess.com>

From: Juliette Alexandria <mcshanejuliette@gmail.com>
Sent: Wednesday, October 19, 2022 10:07 AM
To: Tom Shaw <tom-shaw@hotmail.com>; w3c-wai-ig@w3.org
Subject: Re: Placeholder attribute an accessible name?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi Tom.

Unfortunately (?), yes, the placeholder will provide an accessible name for a component.

Here are some resources, ranging from the technical documentation to explanations of, the Accessible Name Computation which determines such things.

https://www.w3.org/TR/accname-1.2/

https://www.levelaccess.com/how-the-w3c-text-alternative-computation-works/

https://webaim.org/articles/label-name/


Best regards,
Juliette Alexandria

On 10/19/2022 10:02:56 AM, Tom Shaw <tom-shaw@hotmail.com<mailto:tom-shaw@hotmail.com>> wrote:
Hi all.

I came across this:


This input element has an accessible name<https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FWAI%2Fstandards-guidelines%2Fact%2Frules%2Fe086e5%2F%23accessible-name&data=05%7C01%7Ctom%40digitalaccessibilitycentre.org%7Cf01e35eb9f88470eaba308dab1e62faa%7C6cc99ebe9e6a4e39b564e5e9f1736548%7C1%7C0%7C638017899438185204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ETpGHPcRdTLuW8aLz8v2h7fLDFMyLQfTxZBQbm80kVA%3D&reserved=0> because of its placeholder attribute.

Note: While the placeholder attribute is sufficient to provide an accessible name<https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FWAI%2Fstandards-guidelines%2Fact%2Frules%2Fe086e5%2F%23accessible-name&data=05%7C01%7Ctom%40digitalaccessibilitycentre.org%7Cf01e35eb9f88470eaba308dab1e62faa%7C6cc99ebe9e6a4e39b564e5e9f1736548%7C1%7C0%7C638017899438185204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ETpGHPcRdTLuW8aLz8v2h7fLDFMyLQfTxZBQbm80kVA%3D&reserved=0>, a visible<https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FWAI%2Fstandards-guidelines%2Fact%2Frules%2Fe086e5%2F%23visible&data=05%7C01%7Ctom%40digitalaccessibilitycentre.org%7Cf01e35eb9f88470eaba308dab1e62faa%7C6cc99ebe9e6a4e39b564e5e9f1736548%7C1%7C0%7C638017899438185204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=z9OaCudCR2l26wWCVLcjJtRPBGck%2Fwq9QNWgEgricMM%3D&reserved=0> label<https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2FWCAG21%2F%23dfn-labels&data=05%7C01%7Ctom%40digitalaccessibilitycentre.org%7Cf01e35eb9f88470eaba308dab1e62faa%7C6cc99ebe9e6a4e39b564e5e9f1736548%7C1%7C0%7C638017899438185204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YuFRNeyXq59uVQ4LnmsJMy49x3yBX8RdToEA%2F6D4I3Y%3D&reserved=0> that does not disappear when a user starts to enter data is still required for success criterion 3.3.2 Labels or Instructions<https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2FWCAG21%2F%23labels-or-instructions&data=05%7C01%7Ctom%40digitalaccessibilitycentre.org%7Cf01e35eb9f88470eaba308dab1e62faa%7C6cc99ebe9e6a4e39b564e5e9f1736548%7C1%7C0%7C638017899438185204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ckJe0EXoeThCkscNd4nDwgtr8PbJup%2BTS2NXsYLjLYs%3D&reserved=0>.



Source: https://www.w3.org/WAI/standards-guidelines/act/rules/e086e5/




I was wondering if the PA can really act as the accessible name in absence of the label?

The reason for this is because how challenging that can be for screen reader users using mobile devices. JAWS and NVDA for example
Announce the placeholder text even when there is some text in the text field, however, is VO users for example make a mistake and type a letter in there and return back to the text field only the letter input is announced.

So my question is: although not ideal, is this really an acceptable way to provide an accessible name?

Thanks for your time!

Tom

Received on Wednesday, 19 October 2022 18:05:36 UTC