mirror of
https://github.com/videojs/video.js.git
synced 2025-01-29 11:23:10 +02:00
fix: aria-labelledby attribute has an extra space (#4708)
The aria-labelledby attribute on the fontPercent, edgeStyle, and fontFamily select options inlcudes an extra space since there is no ledgendId variable being set on the createElFont_() method. This fix adds a check to see if the legendId value is set or not inside the createElSelect_() method. This should keep the extra space from appearing on the select tags created by the createElFont_() method. Fixes #4688
This commit is contained in:
parent
a3c254eeb8
commit
855adf35a1
@ -312,14 +312,14 @@ class TextTrackSettings extends ModalDialog {
|
||||
`<${type} id="${id}" class="${type === 'label' ? 'vjs-label' : ''}">`,
|
||||
this.localize(config.label),
|
||||
`</${type}>`,
|
||||
`<select aria-labelledby="${legendId} ${id}">`
|
||||
`<select aria-labelledby="${legendId !== '' ? legendId + ' ' : ''}${id}">`
|
||||
].
|
||||
concat(config.options.map(o => {
|
||||
const optionId = id + '-' + o[1];
|
||||
|
||||
return [
|
||||
`<option id="${optionId}" value="${o[0]}" `,
|
||||
`aria-labelledby="${legendId} ${id} ${optionId}">`,
|
||||
`aria-labelledby="${legendId !== '' ? legendId + ' ' : ''}${id} ${optionId}">`,
|
||||
this.localize(o[1]),
|
||||
'</option>'
|
||||
].join('');
|
||||
|
Loading…
x
Reference in New Issue
Block a user