Skip to content

[Fix] 0047063 UI: Rating – aria-label on input instead of label#11018

Merged
thibsy merged 2 commits intoILIAS-eLearning:release_11from
fhelfer:ui/mantis/47063
Mar 11, 2026
Merged

[Fix] 0047063 UI: Rating – aria-label on input instead of label#11018
thibsy merged 2 commits intoILIAS-eLearning:release_11from
fhelfer:ui/mantis/47063

Conversation

@fhelfer
Copy link
Contributor

@fhelfer fhelfer commented Jan 30, 2026

Error: The “aria-label” attribute must not be used on any “label” element that is associated with a labelable element.
https://mantis.ilias.de/view.php?id=47063

Label with for= must not duplicate name via aria-label. Move
aria-label to the radio input; label remains for click target.
Apply to scale options and neutral option.

Problem

  • Validator: <label for="..." aria-label="..."> ungültig, wenn das Label mit Formularelement verknüpft ist; Name soll aus Label-Inhalt kommen.

Lösung

  • aria-label vom label entfernt, auf das jeweilige input (radio) setzen.
  • RatingInputTest anpassen.

@fhelfer fhelfer added bugfix kitchen sink php Pull requests that update Php code labels Jan 30, 2026
@BettyFromHH BettyFromHH added the css/html Pull requests that propose changes to CSS/SCSS or HTML files. label Feb 2, 2026
@Annett7811 Annett7811 added the accessibility Pull requests that propose A11Y changes. label Feb 6, 2026
@Annett7811 Annett7811 self-requested a review February 13, 2026 14:16
Copy link

@Annett7811 Annett7811 left a comment

Choose a reason for hiding this comment

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

Hello!

From an accessibility perspective, this looks good. Thank you very much for your work.

Best regards,

Annett

Copy link
Contributor

@oliversamoila oliversamoila left a comment

Choose a reason for hiding this comment

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

Hello together,
from an UX and UI perspective, the result looks good. Thank you very much for your contribution, @fhelfer.
I'm forwarding this to @thibsy for code review. He may contact you with change requests or incorporate the changes directly (That includes cherry picking too.)

Kind regards,
@oliversamoila (as UI coordinator)

Copy link
Contributor

@thibsy thibsy left a comment

Choose a reason for hiding this comment

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

Hi @fhelfer,

Thx a lot for your contribution to the UI framework!

Please implement the following changes:

  • Accessibility: I think we should actually address this issue with existing semantics. The label and input are already linked, so we should render the {ARIALABEL} inside the label and hide it visually using i.e. <span class="sr-only">.

Kind regards,
@thibsy (as UI coordinator)

@thibsy
Copy link
Contributor

thibsy commented Mar 9, 2026

quick ping @fhelfer =)

@fhelfer fhelfer requested a review from thibsy March 10, 2026 09:21
Copy link
Contributor

@thibsy thibsy left a comment

Choose a reason for hiding this comment

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

Hi @fhelfer, thx a lot for implementing the requested changes. This LGTM now!

@thibsy thibsy merged commit c52f57d into ILIAS-eLearning:release_11 Mar 11, 2026
5 checks passed
thibsy pushed a commit that referenced this pull request Mar 11, 2026
…s. (#11018)

* Fixes https://mantis.ilias.de/view.php?id=47063
* Remove `aria-label` on the label element and show its content to assistive technologies only.
thibsy pushed a commit that referenced this pull request Mar 11, 2026
…s. (#11018)

* Fixes https://mantis.ilias.de/view.php?id=47063
* Remove `aria-label` on the label element and show its content to assistive technologies only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Pull requests that propose A11Y changes. bugfix css/html Pull requests that propose changes to CSS/SCSS or HTML files. kitchen sink php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants