I am building a React App which takes the form of a calendar where the users should be able to click on days on the calendar. These days are represented by large-ish squares, so that they can contain information for that day. For accessibility reasons, using <button>
s seemed to be the wisest option, but my research (Why can't a <button> element contain a <div>?) + (https://www.w3.org/TR/2012/WD-html5-20120329/the-button-element.html#the-button-element) indicates that putting divs inside of buttons is not correct. The only other option I can think of would be to make the days into <div>
s of their own, but make them clickable and manually give them tabIndex
and role
features as appropriate for accessibility purposes.
What is the correct html tag or approach for a clickable area that should also contain possibly multiple <div>
s inside of it?