Skip to content

[Improvement] UI: Remove Glyph Action#11260

Open
fhelfer wants to merge 9 commits intoILIAS-eLearning:release_11from
fhelfer:ui/remove-deprecated-glyph-action
Open

[Improvement] UI: Remove Glyph Action#11260
fhelfer wants to merge 9 commits intoILIAS-eLearning:release_11from
fhelfer:ui/remove-deprecated-glyph-action

Conversation

@fhelfer
Copy link
Contributor

@fhelfer fhelfer commented Mar 12, 2026

related to #10985

@fhelfer fhelfer added improvement php Pull requests that update Php code labels Mar 12, 2026
@fhelfer fhelfer changed the title DRAFT: [Improvement] UI: Remove Glyph Action [Improvement] UI: Remove Glyph Action Mar 17, 2026
@Annett7811 Annett7811 added the accessibility Pull requests that propose A11Y changes. label Mar 20, 2026
@alex40724 alex40724 self-requested a review March 23, 2026 12:26
Copy link
Contributor

@iszmais iszmais left a comment

Choose a reason for hiding this comment

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

Thx!

I approve the changes within DataCollection 👍

@matthiaskunkel
Copy link
Member

23 MAR 2026: Thibeau notified us about this PR and its impact on the improvement of accessibilty in ILIAS 11. He asks all involved authorities to have a quick look on the related changes and let Thibeau know until Thursday if the object. Otherwise, he would merge the PR on Friday to proceed with testing of 11. PR is accepted for 11 and trunk.

Copy link
Contributor

@kergomard kergomard left a comment

Choose a reason for hiding this comment

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

Thank you very much for the PR @fhelfer and @thibsy !

Ok, this looks ok for the changes in the TestQuestionPool and I approve the changes there.

The changes in ilObjectListGUI have an unfortunate side-effect though:

  • Please make sure the pointer is changed to indicate a clickable element in the header indication for Tags.

Thanks again and best,
@kergomard

@BettyFromHH
Copy link
Contributor

On testing the lerning module, ilias crashed on loading the learning progress.

Call to undefined method ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph::withUnavailableAction()

Additional Information:

components/ILIAS/Tracking/classes/repository_statistics/class.ilLPListOfSettingsGUI.php (Line 559)
  
$this->ui_factory->symbol()->glyph()->expand()->withUnavailableAction()

@fhelfer fhelfer force-pushed the ui/remove-deprecated-glyph-action branch from 7f95b48 to a4f273a Compare March 24, 2026 09:53
@fhelfer
Copy link
Contributor Author

fhelfer commented Mar 24, 2026

@BettyFromHH, @kergomard thanks for your comments. I removed the rest of Calls to the deprecated methods & ObjectListGUI Headers are now rendererd with a button

@fhelfer fhelfer requested a review from kergomard March 24, 2026 10:01
Copy link
Contributor

@kergomard kergomard left a comment

Choose a reason for hiding this comment

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

Thanks @fhelfer !

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,

Huge thanks for going after these deprecated usages of 'clickable' glyph components. This is very much appreciated.

As you can see I asked component authorities at JF yesterday to look into this PR until Thursday, so we can possibly merge this by the end of this week.

In addition to my inline comments, please implement the following changes:

  • Event.preventDefault(): you implement around 28 of these method calls inside the client-side logic. I assume this is because the underlying HTML changes from <a> to <button>. I believe most of these can be removed by introducing a new context renderer for our button components which are rendered inside a form (I think without matching the form itself), which adds a type="button" attribute to the rendered HTML. <button> will implicitly inherit a type="submit" if contained inside a <form> – which I think is why you implemented these calls in the first place (accidental form submission).
  • Accessibility: currently we always render glyphs inside a button with role="img" and the respective aria-label if the button does not have a label itself. However, I think the most appropriate solution in this case would be to move the aria-label up to the level of the button, remove it on the glyph and make the glyph aria-hidden="true", because in this case the button is the interactive element that should convey all the information and the glyph is primarily decorative. You should be able to achieve this by updating the button renderer and the "glyph inside button" context renderer.
  • Field\Password::withRevelation(): I think the (S)CSS of the password component isn't too happy about the change from a link to a button element. Could you or maybe @BettyFromHH look into this?

And, one suggestion:

  • Symbol\Glyph examples: while the withUnavailableAction() method does no longer exist, their 'inactive' state still remains. You have simply removed this from the documentation/examples. Now I'm wondering, if it would not make sense to keep this showcase in tact and replace this with a glyph attached to a button. I am however fine with adding this to the roadmap for now (general showcase of glyphs in different button scenarios, e.g. label / no label, disabled, etc.), but maybe @oliversamoila has some strong opinion here?

And btw, neat way of updating the factory descriptions. I like the wording very much.

Kind regards,
@thibsy (as UI coordinator)

@fhelfer fhelfer requested a review from thibsy March 25, 2026 14:12
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 everyone.
I’d also like to say a big thank you for all this work, which was “only” initiated by validation errors but has now grown way beyond that. Thanks @fhelfer
Regarding @thibsy|s question: I think the current documentation for each glyph is very appropriate. There are still examples featuring glyphs for Standard Button, Primary Button, Shy Button and Bulky Button. These are definitely well worth keeping, because of the existing combination possibilities.

Best regards,
@oliversamoila

@fhelfer
Copy link
Contributor Author

fhelfer commented Mar 25, 2026

  • Event.preventDefault(): you implement around 28 of these method calls inside the client-side logic. I assume this is because the underlying HTML changes from <a> to <button>. I believe most of these can be removed by introducing a new context renderer for our button components which are rendered inside a form (I think without matching the form itself), which adds a type="button" attribute to the rendered HTML. <button> will implicitly inherit a type="submit" if contained inside a <form> – which I think is why you implemented these calls in the first place (accidental form submission).

Because these glyphs are injected straight into a legacy template, the renderer has no reliable way to know that they end up inside a

. Until the Answer Wizard is replaced by a proper UI component, we therefore have to keep relying on preventDefault to avoid unintended form submissions.

  • Accessibility: currently we always render glyphs inside a button with role="img" and the respective aria-label if the button does not have a label itself. However, I think the most appropriate solution in this case would be to move the aria-label up to the level of the button, remove it on the glyph and make the glyph aria-hidden="true", because in this case the button is the interactive element that should convey all the information and the glyph is primarily decorative. You should be able to achieve this by updating the button renderer and the "glyph inside button" context renderer.

Done. When the button has no visible label, the button’s aria-label is derived from the glyph (via glyphAccessibleName()). One side effect is that in setups like the notification centre in NotificationItemTest.html, counter information is swallowed.

Best @fhelfer.

@BettyFromHH
Copy link
Contributor

Hi @thibsy,

Field\Password::withRevelation(): I think the (S)CSS of the password component isn't too happy about the change from a link to a button element.

Yes, you're right. The button have to be moved upwards for 5 more pixels. Thanks for that hint.


Hi @fhelfer

Please modify the 070-components/UI-framework/Input/_ui-component_password.scss, Line 4

from

margin-top: -21px;

to

margin-top: -26px;

That should fix that problem.

@fhelfer
Copy link
Contributor Author

fhelfer commented Mar 26, 2026

Thank you @BettyFromHH

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. improvement kitchen sink php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants