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

Defining a legend.labelFormatter function breaks legend keyboard navigation #16818

Closed
longmatthewh opened this issue Dec 22, 2021 · 8 comments · Fixed by #16825
Closed

Defining a legend.labelFormatter function breaks legend keyboard navigation #16818

longmatthewh opened this issue Dec 22, 2021 · 8 comments · Fixed by #16825
Labels
a11y Accessibility related.

Comments

@longmatthewh
Copy link

Expected behaviour

I'd like to be able to utilize legend.labelFormatter to customize the format of the legend labels, and maintain keyboard functionality in the legend—arrow keys to navigate between series and spacebar/return/enter to toggle each series.

Actual behaviour

Upon defining a formatter function—it doesn't matter how complex the function is—expected keyboard functionality in the legend is broken.

  • Define a formatter function
  • Use the keyboard to navigate to the legend
  • Use the arrow keys to navigate between series
  • Use the spacebar to toggle visibility of any series

...I'm no longer able to use the arrow keys to navigate between series or the spacebar to toggle visibilty.

Live demo with steps to reproduce

https://jsfiddle.net/longmatthewh/qby4k80g/16/

Product version

Highcharts JS v9.3.2 w/ the Accessibility module

Affected browser(s)

At least Chrome

@raf18seb
Copy link
Contributor

Hi @longmatthewh, thank you for creating the ticket!

Seems like a duplicate of #16467, but let @oysteinmoseng confirm/decide.

@raf18seb raf18seb added the a11y Accessibility related. label Dec 23, 2021
@oysteinmoseng
Copy link
Member

Same issue, adding a more robust fix.

@longmatthewh
Copy link
Author

Awesome! Thanks @raf18seb and @oysteinmoseng ! Any idea when we'd expect this to make a release?

@oysteinmoseng
Copy link
Member

@longmatthewh It should be part of the next release, and while we don't have a set date for that yet, I would expect a few weeks after New Years. Does that work okay for you?

@longmatthewh
Copy link
Author

@raf18seb yeah, that's fine, thanks. I've got a workaround for what I'm trying to do, but when this change rolls out, I'll definitely take advantage since it'll make our code simpler.

@longmatthewh
Copy link
Author

@raf18seb has this been released yet?

@oysteinmoseng
Copy link
Member

@longmatthewh Sorry about the late update! The previous release was a hotfix release for a specific high-impact issue only, but this fix will be part of v10 coming out in a week or 2. Is this okay for you?

@longmatthewh
Copy link
Author

(cc: @sgupta-deque) thanks for the reply @oysteinmoseng. The sooner we can use labelFormatter and not break keyboard navigation, the better. The workaround we're using should be fine for now. While, a week or 2 for this fix will probably be too late to make it into our release, it is something we'll absolutely need in future releases, though.

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

Successfully merging a pull request may close this issue.

4 participants