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

[docs] Improve nav semantics #27138

Merged
merged 5 commits into from
Jul 12, 2021
Merged

[docs] Improve nav semantics #27138

merged 5 commits into from
Jul 12, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jul 6, 2021

Before:
Screenshot from 2021-07-06 09-37-29

After:
Screenshot from 2021-07-06 09-37-17

Preview: https://deploy-preview-27138--material-ui.netlify.app/components/box/

Since the ToC <nav /> is related to the <main /> element it should be contained within it. Previously both navs were siblings of the <main />

Also adjusted the name of the app drawer. The "navigation" term was redundant (it is implied by the landmark type). "main" might've been misleading since it's not the navigation for the "main" element but rather the whole "documentation".

@eps1lon eps1lon added docs Improvements or additions to the documentation accessibility a11y labels Jul 6, 2021
Comment on lines 40 to 41
[theme.breakpoints.up('sm')]: {
width: 'calc(100% - 175px)',
},
[theme.breakpoints.up('lg')]: {
width: 'calc(100% - 175px - 240px)',
},
width: 'calc(100% - 175px)',
Copy link
Member Author

Choose a reason for hiding this comment

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

I consider this a win as well. The component is now coupled less to the app drawer (width).

@mui-pr-bot
Copy link

mui-pr-bot commented Jul 6, 2021

No bundle size changes (experimental)

Generated by 🚫 dangerJS against c5ea68b

@eps1lon eps1lon marked this pull request as ready for review July 6, 2021 18:35
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

  1. The layout is broken on mobile.

Does the "Skip to content" link still point to the right location?

Capture d’écran 2021-07-07 à 12 43 53

@eps1lon
Copy link
Member Author

eps1lon commented Jul 9, 2021

Does the "Skip to content" link still point to the right location?

Is this a bug report? Not sure what I'm supposed to do with that statement.

The layout is broken on mobile.

Since this is yet another instance where you are unable to provide a bug report, I'll have to guess that 711ac2e fixed it.

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 9, 2021

Is this a bug report? Not sure what I'm supposed to do with that statement.

@eps1lon It's not a bug report. I wanted to highlight the possible implication of the "Skip to content" feature. It's not so obvious to trigger. It seems that you considered it, so all good.

Since this is yet another instance where you are unable to provide a bug report, I'll have to guess that 711ac2e fixed it.

Sorry, I didn't realize it wasn't clear. My assumption was that you forgot to check the layout on mobile, so I raised it.

I'll have to guess that 711ac2e fixed it.

It seems that the new fix capture what I was referring to as a regression (the toc leaving a placeholder on mobile). While this is fixed, we have a different issue to fix: there should be no horizontal scroll bars no matter the screen width. We have a horizontal scrollbar on mobile and tablet.

@eps1lon
Copy link
Member Author

eps1lon commented Jul 12, 2021

I need to work on the composition. The previous composition does not capture the layout correctly.

@eps1lon
Copy link
Member Author

eps1lon commented Jul 12, 2021

there should be no horizontal scroll bars no matter the screen width. We have a horizontal scrollbar on mobile and tablet.

I really don't know how else to tell you this. You seem to be under the impression that this is not a You issue but this is absolutely an issue you need to work on. Please write a detailed bug report. I know what horizontal scrollbars are. I know what a tablet is. I think I know what you mean by "mobile". Neither of these things help me understand what the problem is.

@eps1lon
Copy link
Member Author

eps1lon commented Jul 12, 2021

I wanted to highlight the possible implication of the "Skip to content" feature.

You did not highlight any possible implications. You just vaguely referred to "potential" issues which doesn't say anything. That is not a new insight because any change as potential issues. Without a concrete problem description, you're not saying anything.

It's not so obvious to trigger.

What is not obvious to trigger? Displaying the link and activating it? Activating a link is obvious. I'd be in the wrong field if I didn't know how to activate a link. Displaying it is something I do know since that is a field that I specialize in. You can continue to deny that if that makes you feel better.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

The layout seems correct

Please write a detailed bug report.

The issue was that we had a horizontal scrollbar on mobile, on any of the pages. What other information did you wish to have? It seems that you have fixed it :).

On a side topic, I wouldn't completely discount the value of feedback with partial information. It's similar to what our users are doing on the GitHub issues. It forces us to dive deeper into the issues. I don't know about you, but for me, when it's easy, I don't feel like I learn. Anyway, I'm not saying that partial feedback is great, the time spend investigating an issue might feel like it would better be spent fixing the issue, but I don't think that it's completely worthless.

What is not obvious to trigger?

I meant that the skip nav was implemented by Matt a long time ago. If we ask other members of the team, I doubt they know it exists.

@eps1lon eps1lon merged commit 07107dd into mui:next Jul 12, 2021
@eps1lon eps1lon deleted the docs/main-toc branch July 12, 2021 17:40
@oliviertassinari
Copy link
Member

I have just noticed this regression: https://deploy-preview-27138--material-ui.netlify.app/guides/migration-v4/

Capture d’écran 2021-07-13 à 11 59 45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants