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
PickList: Accessibility #9733
Comments
I think..
|
@melloware could you please elaborate more. |
I will have a PR up shortly for you to review. I think I have them all fixed. |
OK so just a question on <div id="j_id_8z:pojoPickList_ariaRegion" class="ui-helper-hidden-accessible"
role="region" aria-live="polite" aria-atomic="true">Afghanistan</div> What is the purpose of that Region it looks like its is intended to read the "focused" item in the Picklist? Then shouldn't the aria-label just be the focused element like... <div id="j_id_8z:pojoPickList_ariaRegion" class="ui-helper-hidden-accessible"
role="region" aria-live="polite" aria-atomic="true" aria-label="Afghanistan">Afghanistan</div> ??? |
Yup, that should be the right answer, unfortunately I first misunderstood what was used for, but reading the ARIA specification it says that helps the user to scroll through the items, so your interpretation is correct, the aria-label should have the same content of the element, example |
Describe the bug
<div id="j_idt318:pickList_ariaRegion" class="ui-helper-hidden-accessible" role="region" aria-live="polite" aria-atomic="true"></div>
This is very useful for accessibility, but it's missing the aria-label that will allow the screen reader to identify it and read it.
Using the filter feature PrimeFaces will generate this HTML:
<input id="j_idt318:pojoPickList_source_filter" name="j_idt318:pojoPickList_source_filter" type="text" autocomplete="off" class="ui-picklist-filter ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all ui-source-filter-input" aria-label="Filter" tabindex="0">
There are two problems with this:
2. The aria-label will be the same for sourceList and destinationList, as you can immagine for the user could be a bit confusing
3. The filter has a aria-label but there isn't the possibility to add a label or placeholder to it
Reproducer
You can check it out using the showcase for PickList
Expected behavior
role=region
should include aria-label (as per ARIA standard):<div id="j_idt318:pickList_ariaRegion" class="ui-helper-hidden-accessible" role="region" aria-live="polite" aria-atomic="true" aria-label="MYPICKLISTREGIONDESCRIPTION"></div>
The aria-label could be implemented in different ways:
<p:pickList>
like "description" or "roleAriaLabel".<f:facet name="description">MYPICKLISTREGIONDESCRIPTION</f:facet>
<p:pickList>
likesourceFilterLabel
anddestinationFilterLabel
that will generate a label above it like this:Furthermore should be able to:
sourceFilterLabel
anddestinationFilterLabel
Source List Filter
andDestination List Filter
in the .propertiesAs before the default can be insert in the .properties and must have a label for source and another for destination
PrimeFaces edition
Community
PrimeFaces version
12.0.0
Theme
No response
JSF implementation
MyFaces
JSF version
2.3
Java version
1.8
Browser(s)
No response
The text was updated successfully, but these errors were encountered: