Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal Dialog Example: Heading level could be H1 #551

Closed
erikkroes opened this issue Nov 29, 2017 · 5 comments
Closed

Modal Dialog Example: Heading level could be H1 #551

erikkroes opened this issue Nov 29, 2017 · 5 comments
Labels
Practice Page Related to a page within the practices section of the APG question Issue asking a question

Comments

@erikkroes
Copy link

In the modal dialog example, dialogs currently use a <h2> as a heading. As these dialogs are within their own context, wouldn't a <h1> be a better fit?

@mcking65
Copy link
Contributor

Because they are a child window, I have usually recommended a level lower than 1. The lack of a level 1 could actually help some people understand they are not on the main page.

But, I don't think there is any hard and fast rule here. It is one of those subjective calls where there is rationale that could probably justify either approach or a variety of others as well.

Let's see what others have to say. If consensus develops around another approach, we could potentially provide some guidance on this in a future release.

@mcking65 mcking65 added Practice Page Related to a page within the practices section of the APG missing design pattern question Issue asking a question labels Nov 29, 2017
@mcking65 mcking65 added this to the 1.1 APG Release 2 milestone Nov 29, 2017
@sh0ji
Copy link
Contributor

sh0ji commented Feb 12, 2018

I'm generally in agreement with @mcking65 here. I'd argue that the relationship between the dialog element and its triggering element conveys the dialog's relationship to the main page better than its heading structure, but the two techniques aren't exactly mutually exclusive.

The dialog's first heading does seem highly subjective either way. I would be reluctant to be too prescriptive about this, but we do need to be consistent across examples.

@mcking65
Copy link
Contributor

@erikkroes, After discussion in the February 12, 2018 meeting,
there is agreement that the dialog titles could be either H1 or H2.
Some members point out there could also be circumstances where H3+ could be appropriate.

We concluded:

  1. It is helpful if there is a consistent approach across dialogs in an application.
  2. There is not necessarily a need for the APG to prescribe a specific approach.

Is this a satisfactory response? Do you think there is something more that the APG TF should consider?

@jnurthen
Copy link
Member

As @erikkroes 👍 the last comment closing the issue. Please reopen if this is not satisfactory.

@gurooprasad
Copy link

gurooprasad commented Jan 22, 2021

Based on the above comment, if there is no need to prescribe a specific approach, we should at least provide some examples. These examples should provide guidance to decide when to use H1 and non H1 heading levels. @jnurthen Can you please reopen this issue?

notlee added a commit to Financial-Times/origami that referenced this issue Oct 3, 2023
Typically one h1 on a page helps create a navigatable structure.
There Is No Document Outline Algorithm.
https://adrianroselli.com/2016/08/there-is-no-document-outline-algorithm.html#Update10

But I wasn't sure what the right answer is now we have `aria-modal` that can trap focus and mark other elements as inert, and went on a little side quest.

Turns out W3C's APG Task Force (ARIA Authoring Practices Guide) discussed this in a meeting a few years ago.
w3c/aria-practices#551 (comment)

They concluded:

- It is helpful if there is a consistent approach across dialogs in an application.
- There is not necessarily a need for the APG to prescribe a specific approach.

So, I guess provided you're in a modal either h1 or h2 is fine.

APG continue to use h2 in their example and Material UI are undecided, with some interesting back and fourth on when a h1 or h2 might be a better experience.

Probably, it's not a big deal either way. If I had to pick a global rule based on the above and no access to direct user testing for this, I'd go with h2.

Here it is. A quick PR to switch to a h2.

This was prompted by a user question in the support Slack channel.
https://financialtimes.slack.com/archives/C02FU5ARJ/p1696242420071219
notlee added a commit to Financial-Times/origami that referenced this issue Oct 3, 2023
Typically one h1 on a page helps create a navigatable structure.
There Is No Document Outline Algorithm.
https://adrianroselli.com/2016/08/there-is-no-document-outline-algorithm.html#Update10

But I wasn't sure what the right answer is now we have `aria-modal` that can trap focus and mark other elements as inert, and went on a little side quest.

Turns out W3C's APG Task Force (ARIA Authoring Practices Guide) discussed this in a meeting a few years ago.
w3c/aria-practices#551 (comment)

They concluded:

- It is helpful if there is a consistent approach across dialogs in an application.
- There is not necessarily a need for the APG to prescribe a specific approach.

So, I guess provided you're in a modal either h1 or h2 is fine.

APG continue to use h2 in their example and Material UI are undecided, with some interesting back and fourth on when a h1 or h2 might be a better experience.
mui/material-ui#34250

Probably, it's not a big deal either way. If I had to pick a global rule based on the above and no access to direct user testing for this, I'd go with h2.

Here it is. A quick PR to switch to a h2.

This was prompted by a user question in the support Slack channel.
https://financialtimes.slack.com/archives/C02FU5ARJ/p1696242420071219
notlee added a commit to Financial-Times/origami that referenced this issue Oct 16, 2023
Typically one h1 on a page helps create a navigatable structure.
There Is No Document Outline Algorithm.
https://adrianroselli.com/2016/08/there-is-no-document-outline-algorithm.html#Update10

But I wasn't sure what the right answer is now we have `aria-modal` that can trap focus and mark other elements as inert, and went on a little side quest.

Turns out W3C's APG Task Force (ARIA Authoring Practices Guide) discussed this in a meeting a few years ago.
w3c/aria-practices#551 (comment)

They concluded:

- It is helpful if there is a consistent approach across dialogs in an application.
- There is not necessarily a need for the APG to prescribe a specific approach.

So, I guess provided you're in a modal either h1 or h2 is fine.

APG continue to use h2 in their example and Material UI are undecided, with some interesting back and fourth on when a h1 or h2 might be a better experience.
mui/material-ui#34250

Probably, it's not a big deal either way. If I had to pick a global rule based on the above and no access to direct user testing for this, I'd go with h2.

Here it is. A quick PR to switch to a h2.

This was prompted by a user question in the support Slack channel.
https://financialtimes.slack.com/archives/C02FU5ARJ/p1696242420071219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Practice Page Related to a page within the practices section of the APG question Issue asking a question
Projects
None yet
Development

No branches or pull requests

5 participants