From 6f86baee50668a8726a737c4004c0123f3924e87 Mon Sep 17 00:00:00 2001 From: Zach Arend Date: Tue, 14 Dec 2021 01:14:34 +0000 Subject: [PATCH] fix(material/datepicker): change calendar cells to buttons Makes changes to the DOM structure of calendar cells. Previous, the DOM structure looksed like this Existing DOM structure of each calendar body cell ``` > ``` Using the `gridcell` role allows screenreaders to use table specific navigation and some screenreaders would announce that the cells are interactible because of the presence of `aria-selected`. However, some screenreaders did not announce the cells as interactable and treated it the same as a cell in a static table (e.g. VoiceOver announces element type incorrectly #23476). This changes the DOM structure to use buttons inside of a gridcell to make it more explicit that the table cells can be interacted with and are not static content. The gridcell role is still present to table navigation will continue to work, but the `td` elements are now buttons. The gridcell wrapper is only for adding information to the a11y tree and not used for visual purposes. Updated DOM structure: ```
>