Reserved For write/speak/code event
In amp-sidebar, users can tap somewhere outside of the sidebar area to close it, however this is not accessible for blind users who rely on screen-readers to consume the Web. Therefore an alternative approach has been implemented that adds a visually hidden button to amp-sidebar which is discoverable by screen-readers to close the sidebar.
Currently the text for this button is Close the sidebar and is not customizable so it can not be changed or translated.
We need to expose an optional attribute (data-close-button-aria-label) on amp-sidebar that, if set, will replace the text to the provided value.
screenReaderCloseButton is hard-coded to Close the sidebardata-close-button-aria-label attribute if it is provided, it should still default back to Close the sidebar if data-close-button-aria-label is not provided.data-close-button-aria-label attribute.should create an invisible close button for screen readers only test case to assert that the text of the button is Close the sidebardata-close-button-aria-label is present. To do that we need to:getAmpSidebar() to optionally set that attribute ( e.g. if (options.closeText) { ampsetbar.setAttribute('data-close-button-aria-label', options.closeText) }; )getAmpSidebar() and then asserting he text is now something other than Close the sidebar.Fixes #9867 in the description.Once approved, your changes will be merged. ⚡⚡⚡Congrats on making your first contribution to the AMP Project!⚡⚡⚡ You'll be able to see it live across the web soon!
Thanks, and we hope to see more contributions from you soon.
If you have questions ask in this issue or on your Pull Request (if you've created one) or see the How to get help section of the Getting Started guide.
I'll do this one
Hi @rhapsodyai; I sent you an invitation to join ampproject on GitHub; once you accept that I think we'll be able to assign this issue to you. Thanks!
Thanks for helping make AMP better @rhapsodyai!
Most helpful comment
I'll do this one