Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dropdown for language selector as a template for other dropdowns #4204

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Rieven
Copy link
Contributor

@Rieven Rieven commented Mar 24, 2025

Changes

The problem with this implementation is that we cannot use icons in the dropdown, the reason why is that we use the data-open-label and data-close-label to set the dropdown text, but we can only insert text as values.

We use now buttons to trigger the dropdown, making it more flexible to add text to button with icons.

We need to make sure that the accessibility attributes and values are also set.

This PR is a first approach to use both the Manon style and also the use of buttons including WCAG compatibility.

according to: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/

I have used some of these attributes to comply with WCAG. This PR shows a change of only 1 dropdown, a way to use this to all other drop downs across KAT

Demo

image

QA notes

Make sure that the new CSS and JS is build:
cd rocky
nvm use 18 (you must have nodejs 18+ installed)
yarn (install yarn)
yarn dev (activate yarn)


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

Sorry, something went wrong.

@Rieven Rieven requested a review from a team as a code owner March 24, 2025 14:14
@Rieven Rieven marked this pull request as draft March 24, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant