Skip to content

MDL-75699 [docs] Document modal dialogue heading structure - #1678

Open
junpataleta wants to merge 1 commit into
moodle:mainfrom
junpataleta:MDL-75699-modalUpdates
Open

MDL-75699 [docs] Document modal dialogue heading structure#1678
junpataleta wants to merge 1 commit into
moodle:mainfrom
junpataleta:MDL-75699-modalUpdates

Conversation

@junpataleta

Copy link
Copy Markdown
Collaborator

Note: Merge after MDL-75699 lands

Modal dialogue titles are now rendered as an h2 rather than an h5, so that opening a dialogue no longer breaks the page's heading hierarchy.

Add a "Heading structure" section to the Modal Dialogues guide covering the title element and why it is fixed at level 2, nesting body headings from h3, sizing headings with utility classes rather than by element, overriding the header block, and guarding the structure with an accessibility Behat scenario.

The change is backported, so the section is added to the 4.5, 5.1 and 5.2 versioned copies too. The 4.5 copy documents the Bootstrap 4 h5 utility class instead of fs-5, and 4.5 and 5.1 omit the modulename_help example, which only applies from 5.2.

Also add a Moodle 5.3 developer update entry.

Modal dialogue titles are now rendered as an h2 rather than an h5, so
that opening a dialogue no longer breaks the page's heading hierarchy.

Add a "Heading structure" section to the Modal Dialogues guide covering
the title element and why it is fixed at level 2, nesting body headings
from h3, sizing headings with utility classes rather than by element,
overriding the header block, and guarding the structure with an
accessibility Behat scenario.

The change is backported, so the section is added to the 4.5, 5.1 and
5.2 versioned copies too. The 4.5 copy documents the Bootstrap 4 `h5`
utility class instead of `fs-5`, and 4.5 and 5.1 omit the
modulename_help example, which only applies from 5.2.

Also add a Moodle 5.3 developer update entry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 21, 2026 03:14
@netlify

netlify Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b611ee1
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6a87c294824dc500087bb496
😎 Deploy Preview https://deploy-preview-1678--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@junpataleta junpataleta added the blocked-by-tracker This issue is blocked by an issue in https://tracker.moodle.org/ label Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation for the updated modal dialogue title heading semantics introduced by MDL-75699 (modal titles rendered as an h2), explaining how to maintain a valid heading hierarchy inside modal content and how to guard it with accessibility tests. The guidance is applied to the relevant versioned docs, and a Moodle 5.3 developer update entry is added to announce the change and backports.

Changes:

  • Add a new “Heading structure” section to the Modal Dialogues guide describing h2 modal titles, nested headings starting at h3, and safe header overrides.
  • Include an accessibility-focused Behat scenario example for validating heading order in modals.
  • Add a Moodle 5.3 devupdate entry describing the heading change and its backports.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/guides/javascript/modal/index.md Adds the new “Heading structure” documentation for modal titles/headings and testing guidance.
versioned_docs/version-5.2/guides/javascript/modal/index.md Backports the same modal heading-structure documentation for 5.2.
versioned_docs/version-5.1/guides/javascript/modal/index.md Backports the same modal heading-structure documentation for 5.1 (without the 5.2-specific example).
versioned_docs/version-4.5/guides/javascript/modal/index.md Backports the guidance for 4.5, using Bootstrap 4 h5 utility-class wording.
docs/devupdate.md Adds a Moodle 5.3 developer update entry announcing the change and backports.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The `best-practice` axe ruleset checks heading order, so an `@accessibility` Behat scenario is the simplest way to guard the structure of a dialogue:

```gherkin
@accessibility
The `best-practice` axe ruleset checks heading order, so an `@accessibility` Behat scenario is the simplest way to guard the structure of a dialogue:

```gherkin
@accessibility
The `best-practice` axe ruleset checks heading order, so an `@accessibility` Behat scenario is the simplest way to guard the structure of a dialogue:

```gherkin
@accessibility
The `best-practice` axe ruleset checks heading order, so an `@accessibility` Behat scenario is the simplest way to guard the structure of a dialogue:

```gherkin
@accessibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-tracker This issue is blocked by an issue in https://tracker.moodle.org/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants