Skip to content

Commit

Permalink
Add ARIA labels to select elements in the version switcher
Browse files Browse the repository at this point in the history
Fix in CPython didn't apply here.

python/cpython#125934
  • Loading branch information
Privat33r-dev authored Oct 28, 2024
1 parent 841689c commit 6b0b2b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/switchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

function build_version_select(release) {
let buf = ['<select id="version_select">'];
let buf = ['<select id="version_select" aria-label="Python version">'];
const major_minor = release.split(".").slice(0, 2).join(".");

Object.entries(all_versions).forEach(function([version, title]) {
Expand All @@ -42,7 +42,7 @@
}

function build_language_select(current_language) {
let buf = ['<select id="language_select">'];
let buf = ['<select id="language_select" aria-label="Language">'];

Object.entries(all_languages).forEach(function([language, title]) {
if (language === current_language) {
Expand Down

0 comments on commit 6b0b2b7

Please sign in to comment.