drodil / backstage-plugin-toolbox

Most commonly used developer tools within Backstage
MIT License
38 stars 22 forks source link

Accessibility Issue with toolbox #116

Open msebarjr opened 1 month ago

msebarjr commented 1 month ago

I have come across an accessibility issue when working with the toolbox plugin being displayed on Homepage.

Issue: The toolbox plugin widgets that contain a textarea as an input is autofocusing when the page loads. The accessibility issue comes into play when a user moves that specific toolbox widget to the bottom of their screen on the custom homepage. Doing so, when a user either refreshes or visits the homepage, the autofocus brings the user to the portion of the page where the toolbox widget containing this textarea is placed. If this is located off screen at the bottom then this scrolls the user all the way to the bottom.

Replication of Accessibility Issue:

https://github.com/drodil/backstage-plugin-toolbox/assets/53197034/79f8dc69-d033-46ce-bbc8-ef658fb6c2a8

Solution: The DefaultEditor component ( https://github.com/drodil/backstage-plugin-toolbox/blob/main/plugins/toolbox/src/components/DefaultEditor/DefaultEditor.tsx ) line 185 renders a TextField component that sets autofocus to true.

The autofocus should be removed

msebarjr commented 1 month ago

I opened up a PR for this fix