Re: Required input. HTML attribute and plain "required" text in label results in duplication for AT. Hide one?

On 31/08/2022 07:24, Marc Haunschild (Accessibility Consulting) wrote:
[...]
> In my opinion it’s easy to understand and ignore the error message of some browsers - it says, that there is an empty required field, what is completely okay with me while exploring a form.
> Also in my opinion it’s not a failure, because it’s completely correct that there is an empty required input.as a user I just ignore it, because it’s what I want (staying empty while I’m exploring).
> 
> In the other hand programmatically determinable meta information may be very useful for future AT, parsers, automated validation… - so I think - although not the only way to pass this SC - using the required attribute is best practice.
> 
> So I personally hide the visual label from AT and use the required attribute for more coding flexibility.

Agree with all the above, for what it's worth. Being programmatically 
explicit (using the `required` attribute, or `aria-required` if need be) 
first and foremost, and as a stretch goal using targeted `aria-hidden` 
on the visible text that's part of the label that says "(required)" or 
whatever as a way to improve the aural user experience for SR users.

P
-- 
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Wednesday, 31 August 2022 08:41:29 UTC