We are working on enterprise product, which uses Progress Telerik jQuery KendoUI components extensively purchased by our Company. In which Kendo PanelBar is used in many modules of our product.
Now a days we are working on Accessibility (i.e. keyboard and screen reader) as part of out-of-box feature of our product.
The Kendo Panel Bar has been made accessible so that it can be navigated using the keyboard arrow keys, once it receives focus via Tab Key.
We have created small example on dojo.telerik.com (i.e. which can be referred on https://dojo.telerik.com/@chiragvidani/EBEPUnoY/3) to explain issue faced by us, when accessing via Screen Reader. Please find issues below:
Secondly when referring WAI-ARIA practices on www.w3.org website (i.e. https://www.w3.org/TR/wai-aria-practices/examples/accordion/accordion.html), we found some differences as explained below:
Kindly help us with your assistance.
Thanks,
Chirag Vidani
Hi,
So far we have not received an example where the PanelBar generates invalid HTML. As there is not enough information that would allow us to replicate any bug in the PanelBar we are closing the current item.
As per the other topics discussed in the thread:
- Using <h> tags in the widget could be achieved by setting the item text to an HTML (text: "<h1>Item 2</h1>") and setting its encoded option to false. Here is a Dojo sample demonstrating that approach:
https://dojo.telerik.com/ElOhodey/2
- We have also reviewed the possible use of the aria-controls attribute. So far we could not see any benefit from using it to point to a nested element.
Regards,
Veselin Tsvetanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
<
ul
data-role
=
"panelbar"
>
<
li
>
<
span
>
<
span
>Details</
span
>
<
span
></
span
>
</
span
>
<
ul
>
<
li
><
span
>Q1 Forecast</
span
></
li
>
<
li
><
span
>Q2 Forecast</
span
></
li
>
<
li
><
span
>Q3 Forecast</
span
></
li
>
<
li
><
span
>Q4 Forecast</
span
></
li
>
</
ul
>
</
li
>
<
li
>
<
span
>
<
span
>History</
span
>
<
span
></
span
>
</
span
>
<
ul
>
<
li
><
span
>Q1 Forecast</
span
></
li
>
<
li
><
span
>Q2 Forecast</
span
></
li
>
<
li
><
span
>Q3 Forecast</
span
></
li
>
<
li
><
span
>Q4 Forecast</
span
></
li
>
</
ul
>
</
li
>
</
ul
>
Kendo comments:
"You will also notice that I am keeping the properly assigned role attributes in the widget. I have tested that demo in Firefox with NVDA reader. It properly announces the state and the currently focused item within the widget "
My comments:
On verifying the example at https://runner.telerik.io/fullscreen/eBosicOH, each item is announced as menu. One should understand that role menu, menubar, menuitem comes in picture only to provide a choice of "actions" that user can perform. Take for example Windows OS>Notepad>Menubar>File Menu > Open menu item - user wants to perform "Open file" action. You will observe that menus will get used likewise in Google Drive> Spreadsheets>File Menu as well. Other use case for these menu related roles is Site Navigation menus where user wants to perform of visiting some section of website. These could have easily been simple set of links within ul/li but nested lists of links again carry problem of multiple tabs within navigation bar itself to get passed it.
In fact, putting menu related roles creates confusion about kind of widget and its expected behavior for SR user. It is the role attribute which will provide the correct semantic information to Screen Reader which will help user to identify the way widget will behave.
Kendo comments:
"As the PanelBar widget could be placed at any place on the page, it avoids the use of <h> elements that may break the semantic logic of the HTML."
My comments:
I certainly understand your concern. I would like to know the feasibility of providing some initial configuration where one could instantiate the widget with custom heading levels. It is assumed you might provide default role="heading" and developer would have the choice to specify custom value for aria-level which you might set internally.
Kendo comments:
"c. The <ul> and <li> elements in the Kendo PanelBar are used to semantically structure its hierarchical structure."
My comments:
It is absolutely fine to have ul/li elements unless you aren't making it like ul>div/span/anything>li kind of structure as that breaks the HTML semantics and would flag up in HTML validators. WCAG 2.1 Success Criteria 4.1.1 (level A compliance) needs parsable markup.
Kendo comments:
"d. The focus is set on the PanelBar widget element (the <ul>), so that the Tab and Shift + Tab element will properly navigate to and away from the PanelBar widget, instead of navigating among the PanelBar inner items."
My comments:
In your example, why doesn't this happen? Because you are using a composit role of "menu" on the ul element which in turn exposes aria-activedescendent child. This makes the child as the semantically focused element and not the parent ul as the focused element. The roles have influenced the naming. The focused element (indicated by aria-activedescendent) is the li having "details" as its name. This is determined by Inner HTML of that li element.
Kendo comments:
"At the moment, the use of the aria-controls attribute would be redundant, as the content of each item belongs to the same element that contains its header."
My comments:
This isn't the correct justification to avoid aria-controls. The aria-controls allows Screen Readers like JAWS for instance to have their own custom implementation to allow SR user to jump from header to content easily. What you are specifying sounds closer to aria-owns although not exactly. The aria-owns property needn't be specified on parent node if the child node is contained within the parent node. If child node isn't inside parent node and such parent>child relationship needs to be established, aria-owns serves the purpose. In our case, even from aria-owns standpoint, parent and child happen to be siblings.
Agree with this issue. In case of accordions, it is very much needed that the accordions be buttons wrapped inside either of h1-h6 elements. The panel that opens can be containing any type of elements. But the container of the panel which hides/shows content should have an id as well. The header button must aria-controls="panel-container-id". Here is a snippet:
<div role="region" aria-labelledby="btn-id">
<h2><button aria-controls="panel" id="btn-id">Details</button></h2>
<div id="panel"></div>
</div>