mirror of https://github.com/python/cpython
gh-125933: Add ARIA labels to select elements in the version switcher (#125934)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
500f5338a8
commit
1306f33c84
|
@ -7,7 +7,7 @@
|
||||||
document.addEventListener("readthedocs-addons-data-ready", function(event) {
|
document.addEventListener("readthedocs-addons-data-ready", function(event) {
|
||||||
const config = event.detail.data()
|
const config = event.detail.data()
|
||||||
const versionSelect = `
|
const versionSelect = `
|
||||||
<select id="version_select">
|
<select id="version_select" aria-label="Python version">
|
||||||
${ config.versions.active.map(
|
${ config.versions.active.map(
|
||||||
(version) => `
|
(version) => `
|
||||||
<option
|
<option
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));
|
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));
|
||||||
|
|
||||||
const languageSelect = `
|
const languageSelect = `
|
||||||
<select id="language_select">
|
<select id="language_select" aria-label="Language">
|
||||||
${ languages.map(
|
${ languages.map(
|
||||||
(translation) => `
|
(translation) => `
|
||||||
<option
|
<option
|
||||||
|
|
Loading…
Reference in New Issue