ARIA improvements for event elements, tabindex
See original GitHub issueNew solution proposed by @arshaw on 8/30/2021:
Event elements are not always tabbable nor do they always trigger something when the SPACE/ENTER keys are pressed when focused. The solution entails:
- Detecting whether the event is “interactable”. It is interactable if one of the following is true:
- it has an
event.url
property - an
eventClick
handler is defined calendar-wide or for the current view - a new
event.interactable
property is set totrue
. This will be useful for users that attach interactions with eventDidMount hook. it must NOT be set tofalse
.
- Is the event interactable?
- If it IS interactable, we need to ensure it is in the tab order:
- if it has a
event.url
, no further work is required. An<a href="">
will be produced, which ensures it is in the tab order - otherwise, an
<a>
tag without an href will be produced, which will NOT be in the tab order. Unfortunately, we must keep element as an<a>
, otherwise it would be a breaking change. Let’s put atabindex="0"
in tandem with detecting click, ENTER press, and SPACE press.
- if it has a
- If it IS NOT interactable, we need to put
role="presentation"
on the<a>
tag to avoid confusing screen readers. In future version of FullCalendar we will move this markup to a different tag (<span>
?)
Original request by @tyrylu:
Hello. Would it be possible to announce to accessibility technologies that the days and event records may be clicked? It is not obvious, at least in the usage scenario of Owncloud/Nextcloud. I am not sure what could be done than adding a button role to the elements, you may have some better ideas.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:11 (5 by maintainers)
Top Results From Across the Web
ARIA Techniques for WCAG 2.0 - W3C
The purpose of this technique is to demonstrate how to use the WAI-ARIA aria-describedby property to provide programmatically determined, descriptive ...
Read more >Improving Accessibility with WAI-ARIA - SAP Blogs
Using appropriate roles can improve web accessibility by providing more information about the elements in the webpage. Abstract Roles: Exists to ...
Read more >ARIA: tab role - Accessibility - MDN Web Docs - Mozilla
The ARIA tab role indicates an interactive element inside a tablist that, when activated, displays its associated tabpanel.
Read more >Separate tabIndex order for Accessiblity using ARIA in HTML5
Any way to provide a separate tabIndex order for accessible elements in HTML5 using WAI-ARIA? Usecase: Lets take a case where a multiple ......
Read more >Using ARIA - W3C on GitHub
This document is a practical guide for developers on how to add accessibility information to HTML elements using the Accessible Rich ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@christianortega123 the following
eventDidMount
block made events tabbable and clickable for my team:As this is still an open issue, it’s worth mentioning that, while this isn’t currently catered for by fullCalendar, you can use the available callbacks to correct most of it yourself - it’s not an elegant solution, but it works for the time being if this is a requirement for you. e.g.
You might run into some page jump issues though - might also be worth binding a click function after adding the href to prevent the default browser action.