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

demo/a11y-docs-demos #21112

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

demo/a11y-docs-demos #21112

wants to merge 25 commits into from

Conversation

marvin19
Copy link
Contributor

@marvin19 marvin19 commented May 3, 2024

Branch for upgrading and adding new demos to the Accessibility Documentation ( #21111 ).

@marvin19 marvin19 self-assigned this May 3, 2024
@marvin19 marvin19 marked this pull request as draft May 3, 2024 07:23
@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 3, 2024

Visual test results - Differences found

Found 4 diffing sample(s). Please review the differences.


Samples changed

Change type Sample
Modified samples/highcharts/accessibility/expose-as-group-only/demo.js
Modified samples/highcharts/accessibility/accessible-pattern-fill-one/demo.js
Modified samples/highcharts/accessibility/expose-as-group-only/demo.js
Modified samples/highcharts/accessibility/custom-dynamic/demo.js
Modified samples/highcharts/accessibility/custom-dynamic/demo.js
Modified samples/highcharts/accessibility/accessible-table/demo.js
Modified samples/highcharts/accessibility/accessible-dashstyle/demo.js
Modified samples/highcharts/accessibility/point-description-enabled-threshold/demo.js
Modified samples/highcharts/accessibility/custom-dynamic/demo.js
Added samples/highcharts/accessibility/range-description-axis-description/demo.js
Added samples/highcharts/accessibility/expose-as-group-only/demo.js
Added samples/highcharts/accessibility/point-description-enabled-threshold/demo.js
Added samples/highcharts/accessibility/value-description-format/demo.js
Added samples/highcharts/accessibility/before-chart-format/demo.js
Modified samples/highcharts/accessibility/accessible-switch-theme-one/demo.js
Added samples/highcharts/accessibility/accessible-dashstyle/demo.js
Added samples/highcharts/accessibility/accessible-simple-config/demo.js
Added samples/highcharts/accessibility/not-accessible-simple-config/demo.js
Modified samples/highcharts/accessibility/accessible-table/demo.js

@highsoft-bot
Copy link
Collaborator

File size comparison

No differences found

Copy link

@KacperMadej KacperMadej left a comment

Choose a reason for hiding this comment

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

A lot of great demos!

I haven't tested screen reader because I have little expiernce in using it, but please let me know if I should review again with this type of testing included in my review.

Some comments are in one place but are more general and apply to other similar cases as well (e.g. templating; linking API options in the descriptions).

Maybe this should be a different task on its own, but in general we are using the same CSS options for tabels over and over again in the samples and demos - it would be nice to DRY this.

<figure class="highcharts-figure">
<div id="container"></div>
<p class="highcharts-description">The following chart demonstrates a chart showing the use of the <code>dashStyle</code> option.
The chart has two series where the first series is using the <code>dashStyle: 'longdash'</code> and the second series is using the <code>dashStyle: 'shortdot'</code>.

Choose a reason for hiding this comment

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

If the demo will be linked in API this might be redundant, but maybe the API options could be linked to the API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be linked in the API, and also the option is linked in the documentation where the demo is used. So it might be redundant 🤔 But if someone is seeing the demo without any context, then it might be useful

@@ -0,0 +1,23 @@
Highcharts.chart('container', {

Choose a reason for hiding this comment

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

The chart title ("Chart title") could be changed to something better or hidden. Same for the series names - maybe something relevant to the dashStyle option that they are using?

@@ -26,12 +26,18 @@ Highcharts.chart('container', {
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2]
data: [5, 3, 4, 7, 2],
borderWidth: 2,

Choose a reason for hiding this comment

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

Common or repeated series options might look better in plotOptions.

max-width: 800px;
height: 400px;
#container {
height: 420px;

Choose a reason for hiding this comment

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

Not sure if this is a real problem, but it looks like the lack of min-width style prevents the mobile preview in the utils.

Copy link
Contributor

Choose a reason for hiding this comment

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

The mode switch is also not working in the iPhone simulator, when opening http://localhost:3030/samples/view?path=highcharts/accessibility/accessible-switch-theme-one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will take a look!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing that out! I had a extra closing <div>-element after the radio buttons that broke the mobile-preview 😅

samples/highcharts/accessibility/accessible-table/demo.js Outdated Show resolved Hide resolved
@@ -3,4 +3,4 @@
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<div id="container"></div>
<button id="stop">Stop updating live data</button>
<button id="toggle-announce">Stop updating live data</button>

Choose a reason for hiding this comment

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

I believe buttons need some classes to pick up the styling from Bootstrap like in projection explorer or a custom styling could be used like in maps overview.

series.points.length > 20
);
}, 2000);
startUpdatingData();

Choose a reason for hiding this comment

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

load: startUpdatingData also works and matches line No. 26.

color: '#3A3691',
accessibility: {
description: 'Emma walked the most in total during the week with ' +
'75739 steps.',

Choose a reason for hiding this comment

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

If the total could be calculated instead of hard-coded using templating then this could be a nice flex for using templating.

<figure class="highcharts-figure">
<div id="container"></div>
<p class="highcharts-description">
The following chart is demonstrating a very simple configuration, without proper context.

Choose a reason for hiding this comment

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

Is this a demo showing what not to do? If yes, this might not be clearly described.

<div id="container"></div>
<p class="highcharts-description">The following chart demonstrates some Accessibility features of Highcharts, including use of the <code>pointDescriptionEnabledThreshold</code> option.
The <code>pointDescriptionEnabledThreshold</code> is set to 1 in this demo, which means the individual points are are not exposed to a screen reader if a series contains more than one point in this case.
This might be useful for larger series and is set by default to 200 for a chart.</p>

Choose a reason for hiding this comment

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

"This might be useful for larger series and is set by default to 200 for a chart."

The wording suggests the limit is for a chart, so the total number of points from all chart series. How about "This is useful for large series and is set by default to 200." ?

Copy link
Contributor

@bre1470 bre1470 left a comment

Choose a reason for hiding this comment

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

Just comments as I am not sure if changes are needed in this PR or the other one.

BTW the demos with natural sentences are awesome. Using the screen reader it really helps in understanding the data without navigating through everything.


series: [{
data: [1, 3, 2, 4, 5, 4, 6, 2, 3, 5, 6],
dashStyle: 'longdash'
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is related to the second PR or a side note. When I trigger range change animation by deactivating the second series, the animation on the right side is very intense even though I have reduced animation active.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the input! Noted down for research.

@@ -4,6 +4,6 @@
<script src="https://code.highcharts.com/themes/high-contrast-light.js"></script>

<figure class ="highcharts-figure">
<div id="container-area" class="container"></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Both pattern fill demos do not differentiate arearange series by pattern style like the other series types. This is problematic for color blindness.

max-width: 800px;
height: 400px;
#container {
height: 420px;
Copy link
Contributor

Choose a reason for hiding this comment

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

The mode switch is also not working in the iPhone simulator, when opening http://localhost:3030/samples/view?path=highcharts/accessibility/accessible-switch-theme-one

data: [3, 4, 4, 2, 5]
data: [3, 4, 4, 2, 5],
borderWidth: 2,
borderColor: '#000000'
}]
});
Copy link
Contributor

Choose a reason for hiding this comment

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

In case this should be possible, I am not able to enter the table with keyboard or screen reader.

const chart = Highcharts.charts[0],
series = chart.series[0];
updateIntervalId = setInterval(function () {
series.addPoint(
Copy link
Contributor

Choose a reason for hiding this comment

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

Some issues:

  • Keyboard focus is not animated.
  • After 20 points the first points get removed, which removes keyboard focus and I end up in the side panel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this is noted down!

Comment on lines 8 to 9
<p class="highcharts-description">The following chart demonstrates some Accessibility features of Highcharts, including use of the <code>exposeAsGroupOnly</code> option.
The <code>exposeAsGroupOnly</code> is set to true in this demo for two of the series, which means that only the series element is exposed to a screen reader, not its points.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

I am able to enter the series group after focus and reach series points by ctrl + option + arrow down. Maybe the text needs some clarification that this is limited to the text but not keyboard navigation.

},
accessibility: {
series: {
pointDescriptionEnabledThreshold: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be an error. I still get picture info for each point during navigation (in Safari).

@@ -1,4 +1,5 @@
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not able to reach the chart in Safari by keyboard.

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.

None yet

4 participants