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

Add placeholder for heading inside of app content #3957

Conversation

JuliaKirschenheuter
Copy link
Contributor

Summary

Add a possibility for providing a heading for NcAppContent.

Move <h1> heading in the

landmark instead of the <header>.
By jumping directly to the h1 heading the user would be able to navigate through the main content of the page immediately.
See nextcloud/server#36911 (comment)

Before After
Screenshot from 2023-04-05 10-47-51 Screenshot from 2023-04-05 10-42-58

All apps which are using Vue for main content rendering are overriding <main> content from https://github.com/nextcloud/server/blob/master/core/templates/layout.user.php#L91-L93. Because of it it is important to provide a possibility to place a heading in a right place.

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

According to the usage in nextcloud/photos#1727, the purpose of a new slot is to render hidden <h1 class="hidden-visually">.

In this case shouldn't it be a prop instead of a slot?

If it is a slot, then all apps developers need to pass this header with this class. What it they pass anything else?

If it is a prop, we may render it in NcAppContent as we need to.

By the way, shouldn't it have id="page-heading-level-1"?

src/components/NcAppContent/NcAppContent.vue Outdated Show resolved Hide resolved
src/components/NcAppContent/NcAppContent.vue Outdated Show resolved Hide resolved
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
@JuliaKirschenheuter JuliaKirschenheuter force-pushed the fix/37174-add_placeholder_for_heading_inside_of_app_content branch from b5d67aa to 8f54a71 Compare April 6, 2023 12:33
@JuliaKirschenheuter JuliaKirschenheuter merged commit 9c5c6ab into master Apr 6, 2023
15 checks passed
@JuliaKirschenheuter JuliaKirschenheuter deleted the fix/37174-add_placeholder_for_heading_inside_of_app_content branch April 6, 2023 12:40
@Pytal Pytal mentioned this pull request Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
4 participants