WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Can a list item contain a button as its child?

for

From: Birkir R. Gunnarsson
Date: May 14, 2018 11:41AM


If you, however, are using a list construct as the basis for an ARIA
menu you have to hide the list construct from assistive technologies
and give all active items in the menu a role of menuitem:
<ul role="menu" aria-label="actions">
<li role="presentation"><button role="menuitem">edit</button></li>
<li role="presentation"><button role="menuitem">Delete</button></li>
</ul>




On 5/14/18, Lal Poorna Chand < <EMAIL REMOVED> > wrote:
> Thank you.
>
> On 14 May 2018 at 21:13, glen walker < <EMAIL REMOVED> > wrote:
>
>> If you're talking about an <li> element, almost anything can be in it.
>> The
>> content model (
>> https://www.w3.org/TR/html53/grouping-content.html#the-li-element) is
>> "flow
>> content" (https://www.w3.org/TR/html53/dom.html#flow-content-2) which is
>> over 80 different elements.
>>
>> In your specific question, yes, a button can be a child of a list item.
>>
>> Glen
>>
>>
>>
>>
>> On Mon, May 14, 2018 at 9:32 AM, Lal Poorna Chand <
>> <EMAIL REMOVED> >
>> wrote:
>>
>> > Hi,
>> >
>> > My doubt is regarding the control types and their hierarchy.
>> > What can be the structure of a 'List item' control type??
>> >
>> > Thanks,
>> > Chand.
>> >
>> > On 14 May 2018 at 20:51, Angela French < <EMAIL REMOVED> > wrote:
>> >
>> > > Can you describe the text please? Sounds unusual.
>> > >
>> > > Angela French
>> > > SBCTC
>> > >
>> > > -----Original Message-----
>> > > From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of
>> > > Lal Poorna Chand
>> > > Sent: Monday, May 14, 2018 7:01 AM
>> > > To: <EMAIL REMOVED>
>> > > Subject: [WebAIM] Can a list item contain a button as its child?
>> > >
>> > > Hi,
>> > >
>> > > Can a 'list item' contain a button as its child??
>> > > What are the typical structures of a list item and a menu item??
>> > > Explain with examples.
>> > >
>> > > Thanks,
>> > >
>> > > Chand.
>> > > >> > > >> archives
>> > > at http://webaim.org/discussion/archives
>> > > >> > > >> > > >> > > >> > > >> > >
>> > >> > >> > >> > >> >
>> >> >> >> >>
> > > > >


--
Work hard. Have fun. Make history.