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

feat(plugin): add focus tracker plugin #139

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ericrallen
Copy link

I took a stab at adding a Focus Tracker so that users can see what elements have received focus while navigating with a keyboard.

I wasn't sure exactly what styles you'd want to indicate it, but I think this works pretty well.

I left this in Draft Mode because of the tweaks I made to the InfoPanel. It was just so large to only be displaying the current status that we were Tracking Focus, so I added an option that will make it stay fairly small and out of the way.

Also, given the few mentions I've seen of refactoring away from jQuery, I went ahead and made this Plugin have no dependencies.

Closes #127

@khanbot
Copy link

khanbot commented Mar 16, 2019

CLA signature looks good 👍

@ericrallen
Copy link
Author

If you're in agreement with the approach, I'll add tests and move this to Ready for review.

@somewhatabstract
Copy link
Contributor

I haven't forgotten this. I will try to make time this week to give feedback. Thank you for your patience.

test/index.html Outdated Show resolved Hide resolved
@somewhatabstract
Copy link
Contributor

Have you see then the new Accessibility Insights for Web extension that Microsoft has created? It has a great tab tracker in it. I like the lines it draws between elements (though I think I want an arrow pointing in the forward direction).

How difficult do you think it would be to add this kind of feature to this work?

Copy link
Contributor

@somewhatabstract somewhatabstract left a comment

Choose a reason for hiding this comment

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

This looks great. I have some requests inline and an overall one based on the tab tracking in the Accessibility Insights version of this feature. I'd love to hear your thoughts on this.

Also, this needs rebasing onto the latest master since we've now got proper prod vs dev builds going on (no more build artifacts in the repo!).

Great work!

plugins/base.js Show resolved Hide resolved
plugins/focus-tracker/index.js Show resolved Hide resolved
plugins/focus-tracker/index.js Outdated Show resolved Hide resolved
plugins/focus-tracker/index.js Outdated Show resolved Hide resolved
}

getDescription() {
return "Keep track of what's been focused as you tab through the page";
Copy link
Contributor

Choose a reason for hiding this comment

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

No work requested; just musing. I wonder if we can add i18n support to tota11y at some point to make it even more useful for folks.

Copy link
Author

Choose a reason for hiding this comment

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

I think you definitely could. It might be nice to create an Issue to track moving all the strings like this into JSON (you could probably do one Strings file per plugin) so it's easier to translate and select which language you'd like to load the relevant strings for.

plugins/focus-tracker/index.js Show resolved Hide resolved
plugins/index.js Outdated Show resolved Hide resolved
plugins/shared/annotate/index.js Show resolved Hide resolved
plugins/shared/info-panel/index.js Show resolved Hide resolved
test/index.html Outdated Show resolved Hide resolved
@ericrallen
Copy link
Author

@somewhatabstract I just looked at the plugin you mentioned. It shouldn't be too hard to implement something similar.

I do have some concerns about the way they continue to increment the tab count if you move back and forth between items, though.

I feel like you end up with more noise than signal once the numbers start to lose a coherent pattern:

tab-order-confusion

@somewhatabstract
Copy link
Contributor

@somewhatabstract I just looked at the plugin you mentioned. It shouldn't be too hard to implement something similar.

I do have some concerns about the way they continue to increment the tab count if you move back and forth between items, though.

I feel like you end up with more noise than signal once the numbers start to lose a coherent pattern:

Yes, I agree. I think if we reach something we already saw, we should keep the number it had (and perhaps make it clear that we looped back to the "start"). What do you think?

@somewhatabstract
Copy link
Contributor

I also think it isn't clear exactly what the number refers to, so I think some level of connection between the number and the tabbed content makes sense (which is more akin to how we annotate in tota11y anyway).

@ohazda
Copy link

ohazda commented Sep 14, 2020

@somewhatabstract @ericrallen Hey folks, is it still in progress? Let me know if I can help somehow. Really neat feature to have for this tool!

@somewhatabstract
Copy link
Contributor

@somewhatabstract @ericrallen Hey folks, is it still in progress? Let me know if I can help somehow. Really neat feature to have for this tool!

Hi there, @ohazda, thanks for your encouragement and inquiry :)

The delay has been my fault. Unfortunately, priorities what they are, I have not had the bandwidth to tend to this particular garden. In the meantime, if you need focus tracking for accessibility testing, I can recommend the Accessibility Insights extension (https://chrome.google.com/webstore/detail/accessibility-insights-fo/pbjjkligggfmakdaogkfomddhfmpjeni).

@ohazda
Copy link

ohazda commented Sep 16, 2020

@somewhatabstract I see, it's ok. Thanks for the update. I've tried that one but personally I love that tota11y can be integrated into codebase.

@somewhatabstract
Copy link
Contributor

@somewhatabstract I see, it's ok. Thanks for the update. I've tried that one but personally I love that tota11y can be integrated into codebase.

Thank you for your understanding. This is useful feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Keyboard focus tracker
4 participants