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(VInput): add role alert to success/error messages #8681

Merged
merged 2 commits into from
Sep 27, 2019

Conversation

MajesticPotatoe
Copy link
Member

@MajesticPotatoe MajesticPotatoe commented Aug 22, 2019

Description

Adds role alert to v-messages__wrapper so that screenreader can read message/error/hint

Motivation and Context

Fixes #8431

How Has This Been Tested?

visually | chromevox

Markup:

<template>
  <v-container>
    <v-switch
      v-model="success"
      label="Success"
    />
    <v-switch
      v-model="error"
      label="Error"
    />
    <v-switch
      v-model="hint"
      label="Hint"
    />
    <v-input
      :error="error"
      :error-messages="error ? message : ''"
      :hint="message"
      :success="success"
      :success-messages="success ? message : ''"
      :persistent-hint="hint"
    >
      Input
    </v-input>
    <v-text-field
      label="Textfield"
      :error="error"
      :error-messages="error ? message : ''"
      :hint="message"
      :success="success"
      :success-messages="success ? message : ''"
      :persistent-hint="hint"
    ></v-text-field>
    <v-select
      label="Select"
      :error="error"
      :error-messages="error ? message : ''"
      :hint="message"
      :success="success"
      :success-messages="success ? message : ''"
      :persistent-hint="hint"
    ></v-select>
    <v-combobox
      label="Combobox"
      :error="error"
      :error-messages="error ? message : ''"
      :hint="message"
      :success="success"
      :success-messages="success ? message : ''"
      :persistent-hint="hint"
    ></v-combobox>
    <v-autocomplete
      label="Autocomplete"
      :error="error"
      :error-messages="error ? message : ''"
      :hint="message"
      :success="success"
      :success-messages="success ? message : ''"
      :persistent-hint="hint"
    ></v-autocomplete>
  </v-container>
</template>

<script>
  export default {
    data: () => ({
      message: 'Message Text',
      success: false,
      error: false,
      hint: false,
    }),
  }
</script>

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 not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)
  • I've added new examples to the kitchen (applies to new features and breaking changes in core library)

@MajesticPotatoe MajesticPotatoe added a11y Accessibility issue T: enhancement Functionality that enhances existing features labels Aug 22, 2019
@MajesticPotatoe MajesticPotatoe changed the base branch from master to dev August 22, 2019 13:58
@MajesticPotatoe MajesticPotatoe changed the title fix(VMessage): add role alert feat(VMessage): add role alert Aug 22, 2019
@TravisBuddy
Copy link

TravisBuddy commented Aug 22, 2019

Hey @MajesticPotatoe,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: eacb3780-e0c0-11e9-9589-952cf72143c3

@jacekkarczmarczyk
Copy link
Member

VMessages is used to display hints as well - should they have role alert?

@MajesticPotatoe
Copy link
Member Author

MajesticPotatoe commented Aug 22, 2019

VMessages is used to display hints as well - should they have role alert?

Is there an alternative to alert for non-time sensitive info, or should we only limit this to success/error?

@jacekkarczmarczyk
Copy link
Member

#8431 (comment)

dsseng
dsseng previously approved these changes Aug 28, 2019
@MajesticPotatoe MajesticPotatoe dismissed dsseng’s stale review August 28, 2019 12:51

still some changes need to be made.

@johnleider
Copy link
Member

What's the status on this?

@MajesticPotatoe
Copy link
Member Author

MajesticPotatoe commented Sep 24, 2019

What's the status on this?

@johnleider gotta move this so that its conditional based on message usage.

@MajesticPotatoe MajesticPotatoe changed the title feat(VMessage): add role alert feat(VInput): add role alert to success/error messages Sep 24, 2019
packages/vuetify/src/components/VInput/VInput.ts Outdated Show resolved Hide resolved
johnleider
johnleider previously approved these changes Sep 26, 2019
dsseng
dsseng previously approved these changes Sep 26, 2019
Copy link
Contributor

@dsseng dsseng left a comment

Choose a reason for hiding this comment

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

LGTM

@KaelWD
Copy link
Member

KaelWD commented Sep 26, 2019

Not a feature, can rebase to master

@MajesticPotatoe MajesticPotatoe changed the base branch from dev to master September 27, 2019 00:15
@MajesticPotatoe MajesticPotatoe changed the base branch from master to dev September 27, 2019 00:22
@MajesticPotatoe MajesticPotatoe changed the base branch from dev to master September 27, 2019 00:35
@MajesticPotatoe MajesticPotatoe changed the base branch from master to dev September 27, 2019 00:36
@MajesticPotatoe MajesticPotatoe changed the base branch from dev to master September 27, 2019 00:38
@MajesticPotatoe MajesticPotatoe changed the title feat(VInput): add role alert to success/error messages fix(VInput): add role alert to success/error messages Sep 27, 2019
Copy link
Contributor

@dsseng dsseng left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dsseng dsseng left a comment

Choose a reason for hiding this comment

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

LGTM

@dsseng dsseng merged commit 049fbf9 into master Sep 27, 2019
@dsseng dsseng deleted the fix/input-hint-screenreader branch September 27, 2019 04:47
@lock lock bot locked as resolved and limited conversation to collaborators Oct 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y Accessibility issue C: VInput VInput T: enhancement Functionality that enhances existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] v-input hint/errors aren't being read by screenreaders
6 participants