Inquiry Regarding the Use of Checkboxes to Open Modals

Dear W3C Team,

I hope this message finds you well.

My name is Peterson, and I’m seeking clarification regarding accessibility
best practices for implementing modals on the web. Specifically, I would
like to know your stance on using input type="checkbox" to control the
opening and closing of modals.

While this method is technically feasible with CSS techniques like :checked,
I have concerns about its accessibility implications, especially for users
relying on assistive technologies. My primary concerns include:

   - Managing focus correctly within the modal and returning it to the
   trigger element upon closing.
   - Ensuring that the modal content is fully accessible while making the
   background content inaccessible during modal interaction.
   - Whether this approach aligns with or conflicts with the established
   ARIA guidelines and best HTML practices for modals.

I would greatly appreciate any guidance or official recommendations the W3C
may have on this topic, particularly regarding whether a more traditional
button-triggered approach with ARIA roles would be preferred for better
accessibility.

Thank you in advance for your insights.

Kind regards,
Peterson

Received on Thursday, 10 October 2024 12:11:41 UTC