WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: ARIA role changing browser behavior

for

From: Mark Magennis
Date: Dec 5, 2023 2:12AM


As far as I can tell, screen readers often use heuristics to guess what a control might be in cases where it is non-standard or seems to be incorrectly coded. One example is if you add tabindex (with any value) to a list or list item (whether coded as a ul or role="list"), JAWS will announce it as a listbox and enter forms mode when you tab or arrow to it (assuming you have auto forms mode on in your JAWS settings). It seems like JAWS is assuming it is meant to be a listbox and changing its behavior accordingly. I've seen similar behavior due to adding role="button" to a <button> with aria-haspopup.
From: WebAIM-Forum < <EMAIL REMOVED> > on behalf of Jim Allan < <EMAIL REMOVED> >
Sent: Monday 4 December 2023 21:58
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: [EXTERNAL] [WebAIM] ARIA role changing browser behavior

Hi all
I was testing a webpage that had an input that was readonly, but visually
functioned like a dropdown (some kind of react control - I am not a
scripter). the items in the 'dropdown' were 5 divs with several 'class'
values and tabindex=-1. the input control was a disaster and did not
function properly.
I hacked around in the Inspect tool. I removed the 'readonly' and added a
role="listbox" to the <input> and suddenly the input functioned perfectly
from the keyboard with a screenreader.
It has always been my understanding that aria roles change what the screen
reader calls something but does not affect the functioning. I am perplexed.
Could there be something in the JS that is looking for role="listbox" and
doing different things? Or is something else going on?
Anyone else experienced this?
I can't share the code as its a dev site.
Seeking understanding...
Jim

--
TSBVI Need assistance? Click this link for help: MOJO HELP DESK
<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftsbvi.mojohelpdesk.com%2Fmytickets%2Fcreate%23%2Fticket-form-selection&data%7C01%7CMark.Magennis%40skillsoft.com%7Cb9538696eaa146881d3a08dbf514287e%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638373239164039709%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OGkCRLDvo2hL1mpTIvM%2FDpmvt9UZvV%2FZC6f0fzlathA%3D&reserved=0<https://tsbvi.mojohelpdesk.com/mytickets/create#/ticket-form-selection>>

Jim Allan, Accessibility Coordinator
Texas School for the Blind and Visually Impaired
1100 W. 45th St., Austin, Texas 78756
voice 512.206.9315 fax: 512.206.9452 https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tsbvi.edu%2F&data%7C01%7CMark.Magennis%40skillsoft.com%7Cb9538696eaa146881d3a08dbf514287e%7C50361608aa23494da2332fd14d6a03f4%7C0%7C0%7C638373239164039709%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata£K6UiTbIv0op567wrowUyKKRioFarMXF447m%2B8hGYg%3D&reserved=0<http://www.tsbvi.edu/>;
"We shape our tools and thereafter our tools shape us." McLuhan, 1964