MudBlazor / MudBlazor

Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
http://mudblazor.com
MIT License
7.22k stars 1.18k forks source link

Docs: Don't auto-focus search bar to allow keyboard navigation #8786

Closed danielchalmers closed 3 weeks ago

danielchalmers commented 3 weeks ago

Description

Improves accessibility by disabling auto-focus from the docs search bar. It still remains in the search dialog, but the bar would steal focus and stop you from controlling the page via keyboard.

How Has This Been Tested?

visually

Type of Changes

Doesn't auto-focus which also resolves oversight of menu appearing from #8758. Before

https://github.com/MudBlazor/MudBlazor/assets/7112040/1f1245c2-6572-449b-a37e-797dce15c75f

After

https://github.com/MudBlazor/MudBlazor/assets/7112040/2dcd8033-bf74-44d3-aa58-a82adeb7f050

Checklist

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.11%. Comparing base (28bc599) to head (a5b0e0f). Report is 109 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #8786 +/- ## ========================================== + Coverage 89.82% 90.11% +0.28% ========================================== Files 412 420 +8 Lines 11878 12207 +329 Branches 2364 2405 +41 ========================================== + Hits 10670 11000 +330 + Misses 681 663 -18 - Partials 527 544 +17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

danielchalmers commented 3 weeks ago

This is particularly noticeable because of my focus menu PR but I was personally always annoyed by this because it meant that you couldn't use the arrow keys or page up/down to scroll.

What we need is a keyboard shortcut to activate the search dialog. I do plan on adding that at some point.

henon commented 3 weeks ago

This is one of the most complex PRs I have ever reviewed. Thanks a lot for your effort @danielchalmers !

danielchalmers commented 3 weeks ago

This is one of the most complex PRs I have ever reviewed. Thanks a lot for your effort @danielchalmers !

Thank you @henon, I worked tirelessly over several days for this. Finally I can get some sleep...