-
Notifications
You must be signed in to change notification settings - Fork 88
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
enh(NcContent): Add skip content buttons #4983
Conversation
b0374a9
to
9c922a6
Compare
cb74159
to
cdc6a7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking over!
Unfortunately it is not working well (tested again after your second push). 2 scenarios:
- Check "Skip to app navigation" one time -> navigate a bit -> check "Skip to app navigation" second time -> focus remains on a skip button and nothing happens.
- Check "Skip to app navigation" -> go to the app navigation and try to navigate backwards (Shift + Tab) -> navigation will move to the header, not to the app navigation
But those scenarios #4983 (review) are working for "skip to main content" well |
cdc6a7f
to
3025247
Compare
Ah I see when the location hash is already set to that ID then the browser will not update the focus. I fixed this now ✔️ |
What do you mean? If you check "skip to navigation" then the focus should be on the navigation. If you press shift-tab then the next element in reverse order is focused (probably the settings button in the app menu?). |
"Skip buttons" supposed to be one way — to skip the header or navigation. But user doesn't need to return to them on backward navigation. In screen readers a user can return to the beginning with a special shortcut (CTRL+Home usually) |
inject: { | ||
setHasAppNavigation: { | ||
default: () => () => Vue.util.warn('NcAppNavigation is not mounted inside NcContent, this is probably an error.'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we show a warning here, we should add something to the Files app to not show the warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say it depends. Is there any good reason to not use NcContent
?
If yes: Then we can remove the warning and adjust the docs.
If not: We should adjust files to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't, this is the only way we ask Devs to build Vue apps
3025247
to
dfe135b
Compare
Good idea @susnux! Then I would suggest making it even bigger and more informative. I sketched out a suggestion. Todo:
|
@marcoambrosini that looks really amazing! Should we directly implement this or first fix this issue here and the improve when the SVGs are ready? |
@marcoambrosini would it be possible to backport so large improvement to stable28? |
I think this is not large as this part is visible only on initial keyboard navigation. |
8ae45c6
to
3405382
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
3405382
to
a4ac5b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip links are working fine. Can't see SVG's
This comment was marked as resolved.
This comment was marked as resolved.
It looks like the svg is getting resized? |
Forgot to set the size correctly, done now ✔️ |
a4ac5b1
to
d081f21
Compare
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just a couple of comments about the buttons:
- I would invert the order so that first comes navigation and then content
- I would make both of them tertiary
Maybe secondary is better here? To be more visible |
@ShGKme since one f the two will always have a border, I don't think it's needed. But I'm fine with either. |
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Images created by Marco Ambrosini Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
de5504d
to
dc5ef51
Compare
I pushed a commit to resolve both points. vokoscreenNG-2024-01-19_17-01-45.mp4 |
☑️ Resolves
This adds skip content buttons for the Vue app when mounting
NcContent
.It also handles the app navigation if it is not available (meaning do not add that button if there is no app navigation).
And it opens the app navigation when skipping to it.
🏁 Checklist