Oobee (formerly known as Purple A11y) is a customisable, automated web accessibility testing tool that allows software development teams to find and fix accessibility problems to improve persons with disabilities (PWDs) access to digital services.
This PR adds the custom select dropdown to ruleOffCanvas:
1. Change how categorySelectors in ruleOffCanvas are called
Previously, a listener is added to each button before its being pushed to the categorySelector array and then dynamically populated.
This commit change will first push the buttons to categorySelector array, dynamically update expandedRuleCategorySelector and then iterate through the buttons and add a listener.
Use of event.stopImmediatePropagation method to ensure that multiple listeners are not added to the button
2. Add new array and function to handle population and listeners for dropdown category selector in expanded rule
Create functions for this new array per steps 1.
3. Add new functions to handle the removal and addition of class selected for category selected
This is to ensure that in ruleOffCanvas both desktop view and mobile view will match the selected category
4. Add functions to handle keyboard interaction for dropdown category selector in expanded rule
This is for keyboard accessibility (partial), behaviour is the same as Dropdown Category Selector in desktop view.
[x] I've kept this PR as small as possible (~500 lines) by splitting it into PRs with manageable chunks of code
[x] I've requested reviews from 1 reviewer
[x] I've tested existing features (website scan, sitemap, custom flow) in both node index and cli
[ ] I've synced this fork with GovTechSG repo
[ ] I've added/updated unit tests
[ ] I've added/updated any necessary dependencies in package[-lock].jsonnpm audit, portable installation on GitHub Actions
This PR adds the custom select dropdown to ruleOffCanvas:
1. Change how categorySelectors in ruleOffCanvas are called
2. Add new array and function to handle population and listeners for dropdown category selector in expanded rule
3. Add new functions to handle the removal and addition of class selected for category selected
4. Add functions to handle keyboard interaction for dropdown category selector in expanded rule
package[-lock].json
npm audit
, portable installation on GitHub Actions