question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SelectOneMenu: ARIA compliance

See original GitHub issue

Description

Primeface’s SelectOneMenu simulates a combobox using a div with role="combobox" and a hidden input element (in showcase it has the id j_idt343:option_focus ) for the current selected value. To this hidden input element has the role text is assigned, as colored in the screenshot.

When using a screenreader on a page with such an combobox it reads out

text input with auto-completion empty

This might be a bit confused so let’s get the unproblematic parts ot it out of the way first:

  • “auto-completion” comes from aria-autocomplete="list" which is absolutely correct set, see Moz Dev, ARIA autocomplete values
  • “empty” comes from a not yet selected value and is updated when selecting one

So this leaves us with the first value “text input”, which comes from the role attribute of the hidden input element and indicates that on the page there is an text input element instead of an combobox.

According to the accessibilty test team at my work this is problematic for users, who are visible impaired.

primefaces_role_selectOneMenu

Describe the solution you would like

Change the role attribute of the hidden input element from text to combobox so screen readers read out “combobox”.

Additional context

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
christophs78commented, Nov 7, 2022

After talking to my disabled colleague, thinking about this issue and comparing with PrimeVue und Angular Material i think we may try to get rid of the focus-input with text=“text”. The other two implementations work pretty fine without this. They assign role=“combobox” to some DOM-element (eg span). See https://github.com/primefaces/primevue/blob/master/src/components/dropdown/Dropdown.vue. (Input only for editable Dropdown, all other cases span via v-if=“editable”, v-else)

Read more comments on GitHub >

github_iconTop Results From Across the Web

<p:selectOneMenu> generates input field behind select box
The key functionality I need is for accessiblity compliance. I require the label tag to be properly associated with the form element. As...
Read more >
p:selectOneMenu wcag - Page 2 - Prime Community Forum
As a result we now have to only the pt:aria-label attribute to the p:selectOneMenu tag. It works fine with the validators. Primefaces 8....
Read more >
org.primefaces.component.selectonemenu ...
org.primefaces.component.selectonemenu.SelectOneMenuRenderer maven / gradle build tool code. The class is part of the package ➦ Group: org.primefaces ...
Read more >
primefaces - NPM Package Overview - Socket.dev
Package contains a reference to a license without a matching LICENSE file. Found 1 instance in 1 package. Dependencies have 2 critical issues....
Read more >
Untitled
En el metabolismo, Kovenant aria galactica, Park kampinoski wikipedia. ... This far you shall come and no farther, Adobe license compliance review, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found