- From: James Scholes <james@pac.bz>
- Date: Tue, 11 Mar 2025 20:49:58 -0600
- To: Haditsch Stephan <S.Haditsch@rewe-group.at>, "public-aria-practices@w3.org" <public-aria-practices@w3.org>
Hi Stephan, I don't represent the ARIA Authoring Practices Taskforce—I'm just a member of this mailing list—but... From the home page[1], one of the goals of the Authoring Practices Guide is to demonstrate one way to "make accessible web components and widgets with ARIA roles, states and properties". If the checkbox example used an input element with type="checkbox", it wouldn't need any ARIA properties specifically (assuming it was labelled in a supported way). As such, at that point it wouldn't be an example of applying ARIA, but rather just an HTML demo of how to make checkboxes. There are plenty of those on the web already. If you're refactoring a checkbox component in your own product to be more accessible, you should almost certainly be aiming to use a native HTML input with type="checkbox" first. The linked APG example exists to demonstrate a possible technique, and not as a recommendation that all checkboxes be implemented as custom elements. [1] https://www.w3.org/WAI/ARIA/apg/ Regards, James Scholes (he/him) Director of Digital Accessibility, Prime Access Consulting, Inc. https://www.pac.bz/ On 11/03/2025 at 06:02, Haditsch Stephan wrote: > Dear w3 team, > > > > I’m refactoring our checkboxes according to your suggestion here: https://www..w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox/ > > and I was wondering, why you don’t use the inputHTML element with type=”checkbox”.When implementing accessible buttons all sources I have read until now say to use the buttontag, and not a divwith onClickevents, exactly because it is more accessible, so why now use a divinstead of a semantic HTML element? > > > > I’m aware that assigning a role=”button”or a role=”checkbox”is needed, but why not use the HTML element that exists for this reason? > > Best regards, > > Stephan Haditsch >
Received on Wednesday, 12 March 2025 02:50:05 UTC