What problem does this feature solve?
There are several accessibility issues regarding Image component:
- Preview cannot be opened by keyboard users because image does not receive focus. It does not fit WCAG success criterions 2.1.1 and 2.1.3.
- When preview is opened the dialog does not receive focus. It does not fit WCAG success criterions 1.3.1 and 2.4.3.
- Preview buttons like Close, Swap, Flip, Zoom, etc. cannot be focused via keyboard. It does not fit WCAG success criterions 2.1.1 and 2.1.3.
What does the proposed API look like?
- Adding
role="button" to image wrapper div should help. It can be done only if preview !== false.
- Adding
role="dialog" to modal dialog should help.
- Use correct
button elements or at least pass role="button". Also add some focus styles because current outline: none will overried default styles.
What problem does this feature solve?
There are several accessibility issues regarding
Imagecomponent:What does the proposed API look like?
role="button"to image wrapperdivshould help. It can be done only ifpreview !== false.role="dialog"to modal dialog should help.buttonelements or at least passrole="button". Also add some focus styles because currentoutline: nonewill overried default styles.