Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoComplete: Possibility to remove "role=application" on elements #9227

Closed
Bukama opened this issue Sep 22, 2022 · 2 comments · Fixed by #9292
Closed

AutoComplete: Possibility to remove "role=application" on elements #9227

Bukama opened this issue Sep 22, 2022 · 2 comments · Fixed by #9292
Assignees
Labels
accessibility WCAG or ARIA related issues
Milestone

Comments

@Bukama
Copy link
Contributor

Bukama commented Sep 22, 2022

Description

Primeface's autocomplete elements create a <span> tag around them, which is then labeled with role="application".

This can result in problems identifying the "true" meaning of a section, especially for screenreader users, because screenreader reading aloud the term "application" and tell the user that this section is an own "application".

In our scenario this is problematic, because we were implementing a search function and labeled the section with role="search" which should be "added to the container element that encompasses all of the elements that combined to form the search feature of the document or application" to mark this section as a search engine.

But combined with the auto applied application role this results in something like this (reduced HTML to show problem)

<div role="search">
  <label>Search</label>
  <span role="application">
    <input type="text">Search term</input>
  </span>
</div>

Due to the "override" by the application-role screenreader users can get confused whats the real purpose of the section is. Overall this resulted in a failed test step in our application and we were told to remove the role="application", which we can't as there is no confiugration on the Primeface component.

Describe the solution you would like

Enhance the API of auto-complete components to give developers the possibility to disable the automatically added role="application" attribute.

Also enhance documentaiton that this attribut is applied by default and why (I don't know if this is in minds for general accessibilty improvements, planed for Primefaces 13).

Additional context

General context

Based on German and European laws/regulations webpages have to be accessible, following the Web Content Accessibility Guidelines (WCAG) of the W3. In short webpages have to fulfill the requirements of at least the second level ("AA") of the WCAG standard. Based on the EU regulations the German law defines that webpages of German government have to pass the "Barrierefreie-Informationstechnik-Verordnung - BITV 2.0" regulation, represented / verified by the "BITV 2.0 test".

So my team and I are working on making our web apps accessable, so they pass this test. The tests are executed by certified persons from another team. When analyising the results, we came to the conclusion that some violations can't be fixed by ourself only, but need changes in the Primeface's code. This issue is one of them. As my team and I couldn't find out, why some things are implemented the way they are, I created the issue as a feature request rather than a bug - even if, depending from the point of view, you could consider them as such.

Disclaimer: As guidelines say, I asked on the forum if such issues should be posted on Github and they were requested.

Issue related context

Test step 9.2.4.5 of the BITV 2.0 test, based on WCAG: Success Criterion 2.4.5: Multiple Ways requires at least two ways of navigation inside a web app. Aside the obvious main menu that we all know, a valid second path is a search engine, by which users can search for and jump to certain pages.

Further information: Breadcrumbs are not a valid navigation path, because with such the user can only navigate backwards in vertical way, but not forward (or) in horizontal way.

@Bukama Bukama added ‼️ needs-triage Issue needs triaging new feature labels Sep 22, 2022
@melloware melloware added accessibility WCAG or ARIA related issues and removed new feature ‼️ needs-triage Issue needs triaging labels Sep 22, 2022
@melloware melloware changed the title Possibilty to remove "role=application" on autocomplete elements (Accessibility) ARIA: Possibility to remove "role=application" on autocomplete elements Sep 22, 2022
@melloware melloware added this to the 13.0.0 milestone Oct 4, 2022
@jepsar jepsar changed the title ARIA: Possibility to remove "role=application" on autocomplete elements AutoComplete: Possibility to remove "role=application" on elements Oct 7, 2022
@melloware
Copy link
Member

For this one does application make sense at all or should it simply be removed?

melloware added a commit to melloware/primefaces that referenced this issue Oct 7, 2022
@melloware melloware self-assigned this Oct 7, 2022
@melloware
Copy link
Member

OK that application makes no sense there and has been there since 2014 I have no history on why. But clearly it is not correct so I removed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility WCAG or ARIA related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants