moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
66 stars 58 forks source link

Release: Fix smart menu mustache linter warnings #362

Closed abias closed 8 months ago

abias commented 1 year ago

This is a follow-up issue to #300

If you look at a recent GHA run on https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/actions, you will notice that there are several mustache linter warnings which originate from the smart menus contribution.

These warnings are:

/home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/templates/smartmenus-cardmenu-children.mustache - WARNING: HTML Validation error, line 2: Element “li” not allowed as child of element “body” in this context. (Suppressing further errors from this subtree.) (body>    <li data-key="" class="nav-item" role="none" data-forceintomoremenu="false">     )
/home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/templates/smartmenus-cardmenu-children.mustache - WARNING: HTML Validation error, line 9: An element with “role=menuitem” must be contained in, or owned by, an element with “role=menubar” or “role=menu”. (          <a role="menuitem" class="nav-link  "                    href="https://moodle.org"                                        tabindex="-1"                                                        >     )

/home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/templates/fontawesome-iconpicker-popover.mustache - WARNING: HTML Validation error, line 4: Attribute “aria-value” not allowed on element “li” at this point. (          <li aria-value="core:book" aria-label="fa-book"><i cla)
/home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/templates/fontawesome-iconpicker-popover.mustache - INFO: HTML Validation info, line 4: Possible misuse of “aria-label”. (If you disagree with this warning, file an issue report or send e-mail to www-validator@w3.org.) (          <li aria-value="core:book" aria-label="fa-book"><i cla)
/home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/templates/fontawesome-iconpicker-popover.mustache - WARNING: HTML Validation error, line 5: Attribute “aria-value” not allowed on element “li” at this point. (          <li aria-value="core:docs" aria-label="fa-info-circle"><i cla)
/home/runner/work/moodle-theme_boost_union/moodle-theme_boost_union/moodle/theme/boost_union/templates/fontawesome-iconpicker-popover.mustache - INFO: HTML Validation info, line 5: Possible misuse of “aria-label”. (If you disagree with this warning, file an issue report or send e-mail to www-validator@w3.org.) (          <li aria-value="core:docs" aria-label="fa-info-circle"><i cla)

The GHA job does not fail because of this line: https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/blob/master/.github/workflows/moodle-plugin-ci.yml#L97

However, these warnings should be fixed anyway.

abias commented 8 months ago

This was discussed and solved in #508