improved input and button accessibility

This commit is contained in:
Grzegorz Leoniec 2018-11-16 12:33:23 +01:00
parent b662aaba97
commit 9159fb47fe
4 changed files with 22 additions and 2 deletions

View File

@ -37,6 +37,7 @@
v-model="form.email"
placeholder="Deine E-Mail"
type="email"
name="email"
icon="envelope"/>
<ds-input
:disabled="pending"
@ -44,11 +45,14 @@
placeholder="Dein Password"
icon="lock"
icon-right="question-circle"
name="password"
type="password"/>
<ds-button
:loading="pending"
primary
full-width>
full-width
name="submit"
type="submit">
Anmelden
</ds-button>
<ds-space margin="x-small">

View File

@ -13,7 +13,7 @@
iconRight && `ds-input-has-icon-right`
]"
:id="id"
:name="model"
:name="name"
:type="type"
:autofocus="autofocus"
:placeholder="placeholder"
@ -63,6 +63,13 @@ export default {
type: String,
default: null
},
/**
* The name of the field for better accessibility
*/
name: {
type: String,
default: null
},
/**
* Whether the input should be automatically focused
*/

View File

@ -13,6 +13,7 @@
fullWidth && `ds-button-full-width`,
loading && `ds-button-loading`
]"
:name="name"
v-bind="bindings"
:is="linkTag">
<ds-icon
@ -74,6 +75,13 @@ export default {
return value.match(/(router-link|a|button)/)
}
},
/**
* Button name for accessibilty
*/
name: {
type: String,
default: null
},
/**
* Primary style
* `true, false`

View File

@ -9470,6 +9470,7 @@ vue-template-es2015-compiler@^1.6.0:
vue@^2.5.17:
version "2.5.17"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.17.tgz#0f8789ad718be68ca1872629832ed533589c6ada"
integrity sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ==
vuex@^3.0.1:
version "3.0.1"