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

fix: a11y improvements #155

Merged
merged 21 commits into from
Apr 11, 2024
Merged

fix: a11y improvements #155

merged 21 commits into from
Apr 11, 2024

Conversation

richard015ar
Copy link
Contributor

@richard015ar richard015ar commented Apr 9, 2024

Issue: #129

This PR addresses some of the suggestions mentioned in: #129.

@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2024

Codecov Report

Merging #155 (4c00210) into dev (a4297d3) will increase coverage by 1.31%.
The diff coverage is 96.82%.

❗ Current head 4c00210 differs from pull request most recent head 1c0db6b. Consider uploading reports for the commit 1c0db6b to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #155      +/-   ##
============================================
+ Coverage     81.31%   82.63%   +1.31%     
- Complexity      285      289       +4     
============================================
  Files            31       32       +1     
  Lines          1584     1589       +5     
============================================
+ Hits           1288     1313      +25     
+ Misses          296      276      -20     

Copy link

composer.lock

Package changes

Package Operation From To About
symfony/translation-contracts upgrade v3.4.1 v3.4.2 diff

Dev Package changes

Package Operation From To About
laravel/pint upgrade v1.14.0 v1.15.1 diff
phpunit/phpunit upgrade 9.6.17 9.6.19 diff
sebastian/resource-operations upgrade 3.0.3 3.0.4 diff
yoast/phpunit-polyfills upgrade 1.1.0 1.1.1 diff

Settings · Docs · Powered by Private Packagist

@richard015ar richard015ar marked this pull request as ready for review April 10, 2024 17:21
Copy link
Contributor

@greatislander greatislander left a comment

Choose a reason for hiding this comment

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

Two suggested changes.

One other issue is that I realized that the button which dismisses the error notice is included in the announced message because I think WordPress inserts it dynamically after load just like the other content is inserted. This is what's announced when I try to create two institutions both called "Dal":

VoiceOver output which reads: Dismiss this notice. Error: the form is invalid. An institution with the name Dal already exists. Please use a different name.

I would suggest for these you could remove the is-dismissable class. WordPress adds role="alert" to them dynamically so creating a live region within the notice that doesn't include the dismiss button wouldn't work.

resources/views/institutions/form.blade.php Outdated Show resolved Hide resolved
resources/views/institutions/form.blade.php Outdated Show resolved Hide resolved
<p>{{ $result['message'] }}</p>
<div
id="message"
role="status"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be role="alert". It also doesn't seem to be necessary as WordPress adds this dynamically/

@richard015ar
Copy link
Contributor Author

Code LGTM

Copy link
Contributor

@fdalcin fdalcin left a comment

Choose a reason for hiding this comment

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

LGTM

@fdalcin fdalcin merged commit b9230da into dev Apr 11, 2024
6 checks passed
@fdalcin fdalcin deleted the fix/a11y branch April 11, 2024 15:59
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.

5 participants