w3c / aria-practices

WAI-ARIA Authoring Practices Guide (APG)
https://www.w3.org/wai/aria/apg/
Other
1.2k stars 333 forks source link

Should we add aria-haspopup to he modal trigger? #1033

Open DavidMacDonald opened 5 years ago

DavidMacDonald commented 5 years ago

Should we add aria-haspopup to the button? https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/dialog.html

        <button onclick="openDialog('dialog1', this)" aria-haspopup="dialog">Add Delivery Address</button>
<div role="dialog"
     id="dialog1"
     aria-labelledby="dialog1_label"
     aria-modal="true"
     class="hidden">
carmacleod commented 5 years ago

Good question. I think it should. Otherwise, AT users might be confused by the change of context. @mcking65 Do you have an opinion here?

I also wonder whether it should have an ellipsis, i.e. "Add Delivery Address...". Windows and Mac have UX guidelines for when to include/not include an ellipsis on a button.