You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -42,7 +42,7 @@ Luckily ```VueJS``` provides this function inbuilt via the ```v-on:keyup``` attr
42
42
```
43
43
44
44
Similar change was made to all the tooltips. The reason behind this error was that non-semantic element representation
45
-
(i.e. using ```<div>```, ```<span>``` or ```<img>``` instead of a ```<button>```) does not register a keypress listener for these tags and hence they don't respond on keypress.
45
+
(i.e. using `<div>`, `<span>` or `<img>` instead of a `<button>`) does not register a keypress listener for these tags and hence they don't respond on keypress.
46
46
47
47
The second change is related to modals. Modals have some stringent accessilibity parameters that have to be carefully handled.
48
48
The criteria are:
@@ -55,9 +55,9 @@ To meet the criteria we developed a new [modal component](https://github.com/cre
55
55
This modal has an overlay and closes when we press the **esc** key or click on the overlay. The modal also disables other elements when it is opened.
56
56
57
57
The final task achieved in the modal was the implementation of trap focus. For this we used the [vue-trap-focus library](https://github.com/posva/focus-trap-vue)
58
-
The library exposes a ```<focus-trap>``` component which acts as wrapper to enable focus-trap. The implementation we used was:
58
+
The library exposes a `<focus-trap>` component which acts as wrapper to enable focus-trap. The implementation we used was:
@@ -81,14 +81,14 @@ The library exposes a ```<focus-trap>``` component which acts as wrapper to enab
81
81
</focus-trap>
82
82
```
83
83
84
-
Apart from these the modal also has the ```aria-modal``` attribute and the ```role="dialog"``` attribute.
84
+
Apart from these the modal also has the `aria-modal` attribute and the `role="dialog"` attribute.
85
85
These attributes direct our screen readers to recognise this component as a modal and declare it whenever the modal opens.
86
86
87
87
The last improvement involves using appropriate label tags for the form elements. A lot of elements did not have proper labels or were nested in wrong way.
88
88
These elements were fixed and after the fixing the nestings the elements had proper labels which the screen readers were able to identify.
89
89
An example a proper input elements with correct label nesting is:
@@ -103,7 +103,7 @@ An example a proper input elements with correct label nesting is:
103
103
{{ $t(item.name) }}
104
104
</label>
105
105
```
106
-
Notice how the input is a child of the ```<label>``` tag which has the ```for``` attribute to point which element it labels.
106
+
Notice how the input is a child of the `<label>` tag which has the `for` attribute to point which element it labels.
107
107
108
108
Apart from these changes, the eslint configuration of the project were also changed to include a11y-linting for the elments.
109
109
We used the [eslint-plugin-vue-a11y](https://github.com/maranran/eslint-plugin-vue-a11y) to enforce accessibility guidelines for our components via lint checks.
0 commit comments