digipolisantwerp / antwerp-ui_web-components

MIT License
0 stars 4 forks source link

Feature/wcag compliance updates #13

Closed wimvanhorenbeeck closed 2 years ago

wimvanhorenbeeck commented 2 years ago

Changes requested in following tickets: https://jira.antwerpen.be/browse/WCAG-85 https://jira.antwerpen.be/browse/WCAG-89

Changes explained: This PR is mainly to improve the WCAG compliance. The cookie consent modal will always be focused if it is visible. A focus trap was added to prevent users to be able to scroll through the content of the page after tabbing through the modal.

Removed the onKeyDown event for the switch buttons. Pressing enter while focused on the button already worked without the event and because of this the event was fired 2 times causing the switch to enable and disable again. Now the switch buttons work properly while pressing enter on the keyboard.