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

Dynamic text resize is not supported #11768

Open
saqibmbhatti opened this issue May 9, 2024 · 3 comments
Open

Dynamic text resize is not supported #11768

saqibmbhatti opened this issue May 9, 2024 · 3 comments

Comments

@saqibmbhatti
Copy link

Feature Proposal

We're using chart JS and accessibility testing team has raised a defect that the the chart content (Axes labels, tooltips, legends etc.) do not respond if the text is resized using Settings > Appearance > Font Size which makes the chart fail WCAG success criteria 1.4.4

https://www.w3.org/WAI/WCAG21/Understanding/resize-text.html

I've created a quick example here:
https://codepen.io/saqibmbhatti/pen/BaEeXQX

Having this feature would improve the accessibility of the overall library.

Your kind consideration to add this feature would be much appreciated.

Possible Implementation

No response

@LeeLenaleee
Copy link
Collaborator

All the text can be configured by the font's parameter in the config of the specific part that you want to change, in here you can increase/decrease the font size yourself. So you can comply to the spec

@saqibmbhatti
Copy link
Author

Many thanks for your reply. Are you able to provide an example for it?

@LeeLenaleee
Copy link
Collaborator

https://www.chartjs.org/docs/4.4.0/general/fonts.html

This shows how to configure the font size for the legend labels, when you detect that the font size in windows has been changed you adjust options.plugins.legend.labels.size = newFontSize and then call chartVariable.update().

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

No branches or pull requests

2 participants