WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: conveying expand/collapse state with details/summary elements

for

From: Birkir R. Gunnarsson
Date: Jun 4, 2020 12:37PM


Correct, you shoulod not have to add anything to the <summary> element.
Once you do, you have to toggle the aria-expanded state with
Javascript instead of letting the browser do it.

On 6/4/20, Wing Kuet < <EMAIL REMOVED> > wrote:
> Thanks that really helpful. In my case it looks the client has added the
> aria-expanded and the role=button attribute which is preventing the state of
> the button from being announced using VoiceOver. I do not know if that is
> the exact reason but from observation that is what I can see. In Graham's
> response the example he provided currently announces the expand and collapse
> state as there is no role="button" attribute or the aria-expanded
> attribute.
>
> Regards,
>
> Wing Kuet
> Accessibility Consultant & Software Tester
> Test Partners Ltd
> 020 8102 9500 (switchboard)
> 020 8102 9507 (direct)
> <EMAIL REMOVED>
> www.testpartners.co.uk
>
>