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

Set the background color on <option> to fix readability issue #5278

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

dhruvkb
Copy link
Member

@dhruvkb dhruvkb commented Dec 15, 2024

Fixes

Fixes #5277 by @dhruvkb

Description

This PR adds a bg-overlay class to the <option> elements so that they will be readable in both dark and light modes. Prior to this, they were inheriting the bg-tx from the parent <select> and rendering a white background in dark mode, making the light text unreadable.

Screenshot

image

Testing Instructions

Note

You need to test this on Windows. It'll be nice if you have a Windows machine, but you can also test using BrowserStack Live (with their Local plugin).

  1. Check out the PR and run the dev server.
  2. Switch between dark and light theme and try to see the language selector and theme dropdowns.
  3. The text should always be readable.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (ov just catalog/generate-docs for catalog
    PRs) or the media properties generator (ov just catalog/generate-docs media-props
    for the catalog or ov just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@dhruvkb dhruvkb requested a review from a team as a code owner December 15, 2024 06:15
@dhruvkb dhruvkb requested review from krysal and obulat December 15, 2024 06:15
@openverse-bot openverse-bot added 🧱 stack: frontend Related to the Nuxt frontend 🟧 priority: high Stalls work on the project or its dependents 🛠 goal: fix Bug fix 🕹 aspect: interface Concerns end-users' experience with the software ♿️ aspect: a11y Concerns related to the project's accessibility labels Dec 15, 2024
Copy link

github-actions bot commented Dec 15, 2024

Latest k6 run output1

     ✓ status was 200

     checks.........................: 100.00% ✓ 402      ✗ 0   
     data_received..................: 92 MB   380 kB/s
     data_sent......................: 52 kB   218 B/s
     http_req_blocked...............: avg=47.09µs  min=2.32µs   med=4.93µs   max=3.28ms   p(90)=150.24µs p(95)=184.24µs
     http_req_connecting............: avg=33.77µs  min=0s       med=0s       max=3.24ms   p(90)=101.61µs p(95)=120.12µs
     http_req_duration..............: avg=198.4ms  min=31.78ms  med=154.1ms  max=1.4s     p(90)=368.46ms p(95)=417.27ms
       { expected_response:true }...: avg=198.4ms  min=31.78ms  med=154.1ms  max=1.4s     p(90)=368.46ms p(95)=417.27ms
   ✓ http_req_failed................: 0.00%   ✓ 0        ✗ 402 
     http_req_receiving.............: avg=165.4µs  min=64.27µs  med=143.26µs max=810.65µs p(90)=277.01µs p(95)=342.19µs
     http_req_sending...............: avg=29.46µs  min=9.75µs   med=23.09µs  max=1.76ms   p(90)=38.37µs  p(95)=43.35µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=198.21ms min=31.67ms  med=153.95ms max=1.4s     p(90)=368.15ms p(95)=417.02ms
     http_reqs......................: 402     1.66929/s
     iteration_duration.............: avg=1.07s    min=386.71ms med=1.15s    max=2.49s    p(90)=1.4s     p(95)=1.84s   
     iterations.....................: 75      0.311435/s
     vus............................: 1       min=0      max=6 
     vus_max........................: 60      min=60     max=60

Footnotes

  1. This comment will automatically update with new output each time k6 runs for this PR

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Windows, this fixes the issue 🎉

@dhruvkb dhruvkb merged commit d979b1c into main Dec 16, 2024
46 checks passed
@dhruvkb dhruvkb deleted the select_dropdown_bg branch December 16, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿️ aspect: a11y Concerns related to the project's accessibility 🕹 aspect: interface Concerns end-users' experience with the software 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Language selector hard to read in dark mode
3 participants