BUGFIX: template-require-media-caption — compare kind="captions" case-insensitively#2718
Merged
NullVoxPopuli merged 1 commit intoApr 21, 2026
Conversation
…sitively HTML enumerated attribute values are case-insensitive per the spec: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attributes Before: <track kind="Captions"> and kind="CAPTIONS" were treated as missing a captions track. Lowercase the value before comparison. Matches jsx-a11y and vue-a11y (both lowercase before comparing).
NullVoxPopuli
approved these changes
Apr 21, 2026
johanrd
added a commit
to johanrd/eslint-plugin-ember
that referenced
this pull request
Apr 21, 2026
…itively HTML attribute value comparison is ASCII case-insensitive per spec, so `aria-hidden="TRUE"` and `aria-hidden="True"` (and their mustache-string equivalents) should be recognised as truthy. Mirrors the same case- handling choice made in ember-cli#2718 for `kind="captions"`. Tests cover `"TRUE"`, `"True"`, `{{"TRUE"}}`, `{{"True"}}`.
This was referenced Apr 21, 2026
Merged
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a Phase 3 a11y-parity audit against jsx-a11y / vue-a11y / angular-eslint-template / lit-a11y.
kind="Captions"is equivalent tokind="captions".kindAttr.value.chars === 'captions'literally, flagging<track kind="Captions">as missing a captions track.Fix: lowercase the value before comparison.
Two new valid tests:
<track kind="Captions">,<track kind="CAPTIONS">.Prior art
media-has-captionString.prototype.toLowerCase()before comparison. Valid test<audio><track kind="Captions" /></audio>at__tests__/src/rules/media-has-caption-test.js:50.media-has-caption<audio><track kind='Captions' /></audio>atsrc/rules/__tests__/media-has-caption.test.ts:17.