[accessibility] Document order #385
Labels
No labels
Codeberg Pages
Documentation Usability
Forgejo
Good First Issue! 👋
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Question
Kind: Security
Licensing
Part: Generator
Priority: High
Priority: Low
Priority: Medium
Reviewed: Confirmed
Reviewed: Duplicate
Reviewed: Invalid
Reviewed: Wontfix
Status: Blocked
Status: Help wanted
Status: In progress
Status: Needs feedback
Status: Ready for Review
Status: Review
Status: Stale
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Codeberg/Documentation#385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
All pages under https://docs.codeberg.org/ have a document order (natural tab index) that makes it difficult to navigate with a keyboard.
Currently, to navigate onto the main section of a document page, the user has to:
Ideally, the initial keyboard focus should be on the "main" section of the page, which is currently a
div.content-wrapper(side note, it should probably be a<main>element instead) - where the main heading and the text itself start.If that is difficult to implement for now, a "skip navigation" link as the first element of the page would probably suffice.
I am not familiar with eleventy nor the
.njkfile(s), but I'd be glad to help if I can.@banaanihillo thank you for the hint. It would be great if you could take a look at this. If you follow the setup instructions and get a successful local build, you can probably modify this file https://codeberg.org/Codeberg/Documentation/src/branch/main/content/_includes/default_layout.njk and it should apply the structure locally. As far as I can see, you don't have to care about any other files, but you can do modifications directly in the site.
Alternatively, you could save the page as a static local file and do the modifications in the resulting HTML dom, then send us the difference. I am sure someone can apply this back to the template.
Let us know if we can be of any assistance.
Thanks for the instructions! I took a closer look at the default layout and played around with a couple different approaches, and I think the most simple one for now would be:
<a href="#main-content">Skip to main content</a>link onto the top navigation (crude example shown in the screenshot), and add saidid="main-content"attribute onto the "main content" container{% include 'license.njk' %}line further down the document order, since the hidden modal has a side effect of conflicting with the top navigation bar and the sidebar navigationI noticed the two existing links within the top navigation bar (View History and View Source) have a more intricate design to them, so I did not quite create a pull request yet until I have a chance to figure out how they work.
Side note one: I tried to add a screenshot of the crude design but I was unable to do so with the default editor, so I tried the other editor using the button with the two arrows, but now I am stuck with that editor with which I can not even access the toolbar.
Side note two: I disabled GNU LibreJS to try to add that screenshot, but had to re-enable it to even write this comment since the other editor has an elaborate focus trap with no escape hatch (had to use F6 on a Gecko-like browser to escape). I think I'm in the wrong repository to discuss that issue further, but just wanted to give a heads-up.
Here's a
git diffof the above:Right, figured out where to change back to the default editor. Had to remove the local storage item with browser developer tools since I could not find that setting within my account preferences or such.
Crude design screenshot uploaded onto another issue since I could not find how to add it here.
Just as I was about to add this comment, I noticed where to upload files. So here's another screenshot of the crude design.
Some miscellaneous notes about this issue and a couple related things:
I'll take a closer look at note 4 since that would mostly solve the issue I was thinking of when creating this ticket.
I am unsure about note 3 since I have no practical experience of screen readers, so I'd rather not dive right into it before hearing some more opinions on how it should be implemented instead.