Skip to content

2842 Adds alert role so error will be announced by screen reader - #6

Open
davezuckerman wants to merge 1 commit into
ANW-2833from
ANW-2842-error-message
Open

davezuckerman wants to merge 1 commit into
ANW-2833from
ANW-2842-error-message

Conversation

@davezuckerman

Copy link
Copy Markdown

Adds alert role to _form_messages for screen readers

Related Ticket (JIRA or GitHub Issue)

[2842]

Summary

Fixes issue with error message not being announced to screen readers

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change, for example API endpoint renaming)
  • My change requires a change to the documentation - If so elaborate:

Checklist:

  • I have read and agree to the CONTRIBUTING document.
  • I have authority to submit this code. - See our licensing
  • Have you added tests to cover these changes? If not why:

@awilfox awilfox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r+wc - we need to discuss adding the role to the warning container as well.

I have been looking high and low for any normative reference that I could give for this, since I know it's a common pattern and I know that it's something most do, but I couldn't find any. The only reference I could find to using role="alert" on warning conditions in addition to errors is on the Alert Example in the ARIA Authoring Practices Guide.

</div>
<% end %>
<% if @exceptions.has_key?(:warnings) %>
<div class="alert alert-warning">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this also have a role="alert"?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Should that be a different ticket since this one specifically mentions error?

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.

2 participants