priceline / design-system

Priceline.com Design System
https://priceline.github.io/design-system/
MIT License
722 stars 119 forks source link

Pcln-popover aria-label hard coded #720

Closed tfquirk closed 4 years ago

tfquirk commented 4 years ago

Line 66 of Pcln-popover hard codes the aria-label:

Screen Shot 2020-03-02 at 11 12 36 AM

Ideally, we would allow a more flexible aria-label to be passed to avoid accessibility errors such is this currently being called out in our storybook:

Screen Shot 2020-03-02 at 11 12 59 AM

This would allow the popover to truly wrap any child content and avoid this accessibility issue.

dgiraldo313 commented 4 years ago

As part of this fix, we should also remove the aria-label in PopperGuide https://github.com/priceline/design-system/blob/master/packages/popover/src/PopoverContent.js#L91

The reason we don't want the aria-label in the PopperGuide is because when we bring focus to the dialog, the screen reader will only read the aria-label and not the content inside. This can be problematic in most instances, since it won't provide enough context to the users as to what's inside of the dialog.

cc. @bmansell