Re: Aria role="heading" and aria-level inside buttons

You can't have a heading inside a button, structurally (whether you use 
<hx> or role="heading"), so no this won't work.

P

On 07/07/2024 07:18, Bernat Lleonart wrote:
> Hi
> 
> I have this markup, and although the validator doesn't show any error, 
> I'd like to know if it would create any problem to users with assistive 
> technologies:
> 
> <h1>Main heading</h1>
> <button><span role="heading" aria-level="2">Button with heading 2</ 
> span></button>
> <button><span role="heading" aria-level="3">Button with heading 3</ 
> span></button>
> <h4>Heading 4</h4>
> 
> The validator outline shows that headings 2 and 3 are being skipped.
> 
> Any help will be really appreciated.
> 
> Thanks.
> 
> --
> Bernat Lleonart
> 
> Enviat amb el correu segur de Proton Mail <https://proton.me/>.

-- 
Patrick H. Lauke

* https://www.splintered.co.uk/
* https://github.com/patrickhlauke
* https://flickr.com/photos/redux/
* https://mastodon.social/@patrick_h_lauke

Received on Sunday, 7 July 2024 11:09:03 UTC