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

Replace h2 in empty content with h1 #513

Open
max-nextcloud opened this issue Jan 22, 2023 · 8 comments
Open

Replace h2 in empty content with h1 #513

max-nextcloud opened this issue Jan 22, 2023 · 8 comments
Labels

Comments

@max-nextcloud
Copy link
Collaborator

On the initial landing page there is no heading of level one (h1). The landing page heading is h2 at the moment.

For good accessibility with screen readers it's recommended to not skip heading levels and therefore start with an h1:

it is important to not skip one or more heading levels. Doing so may create confusion, as the person navigating this way may be left wondering where the missing heading is.

Screenshot ("Collectives" is the h2):
Bildschirmfoto vom 2023-01-22 21-55-35

Originally posted by @mspae in #159 (comment)

@max-nextcloud
Copy link
Collaborator Author

Turns out this is not as easy as i thought it was. The component used here is an NcEmptyContent - and that uses h2 tags for the title. So we'd need to make that component configurable.

@ChristophWurst
Copy link
Member

@max-nextcloud
Copy link
Collaborator Author

I'm pretty sure there's none in our case:
grafik

I think that's because we are using our own template.
But you're right we could also add the heading to the template or to the main section as a visually hidden h1.

@ChristophWurst
Copy link
Member

TemplateResponse should still extend the server layouts AFAIK

@max-nextcloud
Copy link
Collaborator Author

TemplateResponse should still extend the server layouts AFAIK

Looks like we are repacing the entire main#content just like the app tutorial.

So we probably should stop doing that.

@ChristophWurst
Copy link
Member

Whoops. Good catch!

@max-nextcloud
Copy link
Collaborator Author

Looks like replacing main#content is a good option as this allows us to use NcAppContent which also has a main element and there may only be one in the dom.

So i will continue trying to turn the h2 into an h1.

@JuliaKirschenheuter
Copy link

JuliaKirschenheuter commented Feb 13, 2023

Please pay attention on this existing ticket: nextcloud/server#35626 (comment), nextcloud/server#35626 (comment). I already working on replacing headings in meaningful way. I haven't touched Collective apps yet, but probably would have a solution for all apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants