-
Bug
-
Resolution: Fixed
-
Minor
-
3.6.6, 3.7.2, 3.8, 3.9
-
MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MDL-66849-master -
Custom menu items that don't have an optional tooltip title (3rd parameter) specified, end up with duplicated menu item text in the HTML title attribute. This is an accessibility issue because screen readers will read both the link text and the title attribute resulting in every menu item being repeated twice.
Parent dropdown custom menu items that should have a title, when specified, do not end up with a title tag.
What I expected
If no tooltip title parameter is specified, there should be no title attribute included in the link. If a title was specified, it should be included in the link.
Before the fix is applied
Before you begin, make sure your Moodle site is using the default Boost theme as some 3rd party themes may override Moodle's default behaviour.
- Log into Moodle as a Moodle Administrator.
- Navigate to Site Administration > Apperance > Theme > Theme settings
- In the Custom menu items field, copy the example included in that section and paste it into the field. For our purpose, you will need to make 2 changes:
- Replace the first line with: Moodle community||My community
- Replace the 4th line with: -German Moodle Docs|https://docs.moodle.org/de|Documentation in German
- Scroll down to the bottom of the page and click Save Changes.
Before the fix is applied
Screenshot
As you can see in the screenshot of the HTML source code for all of the links in the custom menu:
- There is no title attribute for the Moodle community menu item. This is incorrect as title parameter was specified yet none appear (highlighted in yellow).
- There are a title attribute for the Moodle Free Support, Moodle Docs, Moodle Development, and Moodle.com menu items. This is incorrect as a ** title parameter was not specified for any of these items and is an accessibility issue. (highlighted in red).
- There is a title attribute for the German Moodle Docs menu item: Documentation in German. This is correct as a title parameter was specified (highlighted in green).
- will help resolve
-
MDL-39079 Adding title attribute to links for accessibility goes against recommendations in WCAG and is rarely useful.
- Closed