Skip to content

Commit

Permalink
feat: add accessibility check
Browse files Browse the repository at this point in the history
  • Loading branch information
tblivet committed Nov 4, 2024
1 parent 300248d commit cd78c7d
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _dev/src/scss/components/_logs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $e: ".logs";
&__scroll {
flex-grow: 1;
min-height: var(--#{$ua-prefix}logs-height);
overflow-y: scroll;
overflow-y: auto;
scroll-behavior: smooth;
}

Expand Down
3 changes: 2 additions & 1 deletion storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const config: StorybookConfig = {
"@storybook/addon-webpack5-compiler-swc",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-styling-webpack"
"@storybook/addon-styling-webpack",
"@storybook/addon-a11y"
],
framework: {
name: "@sensiolabs/storybook-symfony-webpack5",
Expand Down
125 changes: 125 additions & 0 deletions storybook/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"devDependencies": {
"@sensiolabs/storybook-symfony-webpack5": "file:vendor/sensiolabs/storybook-bundle/storybook",
"@storybook/addon-a11y": "^8.4.1",
"@storybook/addon-essentials": "^8.0.0",
"@storybook/addon-links": "^8.0.0",
"@storybook/addon-styling-webpack": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions storybook/stories/components/RadioCardLocal.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export const Local = {
},
form_fields: {
channel: "local",
archive_zip: "local",
archive_xml: "local",
archive_zip: "local_zip",
archive_xml: "local_xml",
},
current_values: {
channel: "local",
Expand Down
2 changes: 2 additions & 0 deletions views/templates/components/logs-progress.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<div class="progress log-progress__bar">
<div class="progress-bar"
role="progressbar"
aria-label="{{ "Progress is %s%"|trans({'%s': progressPercentage}) }}"
title="{{ "Progress is %s%"|trans({'%s': progressPercentage}) }}"
aria-valuenow="60"
aria-valuemin="0"
aria-valuemax="100"
Expand Down
2 changes: 1 addition & 1 deletion views/templates/components/logs.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if logs %}
<div class="logs">
<div class="logs__inner">
<div class="logs__scroll">
<div class="logs__scroll" tabindex="0">
<div class="logs__list">
{% for log in logs %}
<div class="logs__line logs__line--{{ log.status }}"
Expand Down
1 change: 1 addition & 0 deletions views/templates/components/modal.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="modal fade {% if modalDanger %}modal--danger{% endif %}"
{% if modalId %}id="{{ modalId }}"{% endif %}
aria-label="{{ title }}"
role="dialog"
tabindex="-1">
<div class="modal-dialog {% if modalSize and modalSize != "md" %}modal-{{ modalSize }}{% endif %}"
Expand Down
2 changes: 1 addition & 1 deletion views/templates/components/render-select.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block action_content %}
<div class="render-field__select">
<select name="{{ name }}" id="{{ id }}">
<select name="{{ name }}" id="{{ id }}" aria-label="{{ name }}">
{% for choice_value, choice_key in choices %}
<option value="{{ choice_value|default(0) }}" {{ choice_value == value ? 'selected' : '' }}>
{{ choice_key }}
Expand Down

0 comments on commit cd78c7d

Please sign in to comment.