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(VSnackbar): a11y and appearance improvements #10263

Merged

Conversation

phiter
Copy link
Contributor

@phiter phiter commented Jan 18, 2020

Description

This merge request improves the appearance of the Snackbar action button and makes the whole snackbar be properly announced by screen readers.

Motivation and Context

Focus states are obligatory for accessibility and the current action button does not have a focus state.
Also the screen reader should immediately announce a snackbar message when it shows up.
fixes #10047

How Has This Been Tested?

I have tested using NVDA and visually too.

Markup:

<template>
  <v-container>
    <v-btn
      dark
      @click="snackbar = true"
    >
      Open Snackbar
    </v-btn>

    <v-snackbar
      v-model="snackbar"
    >
      {{ text }}
      <v-btn
        text
        @click="snackbar = false"
      >
        Hello
      </v-btn>
    </v-snackbar>
  </v-container>
</template>

<script>
  export default {
    data: () => ({
      snackbar: false,
      text: 'Hello, I am a snackbar',
    }),
  }
</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)

enables background for the action button
sets color only for text, icon and outlined button
fixes vuetifyjs#10047
@phiter phiter requested a review from johnleider January 21, 2020 02:17
@johnleider johnleider added C: VSnackbar T: bug Functionality that does not work as intended/expected labels Jan 21, 2020
@johnleider johnleider added this to the v2.2.x milestone Jan 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: VSnackbar T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Snackbar accessibility improvements
2 participants