Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@thumbtack/tp-ui-component-form-note

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thumbtack/tp-ui-component-form-note

`aria-describedby` should be used to [associate form fields with form notes](https://www.w3.org/TR/WCAG20-TECHS/ARIA1.html#ARIA1-ex2). The value of `aria-describedby` must match the form note’s `id`.

latest
Source
npmnpm
Version
0.1.7
Version published
Maintainers
4
Created
Source

package: '@thumbtack/tp-ui-component-form-note' kit: form-note/index.mdx platform: scss url: /components/form-note/scss/ mdxType: componentApi

import '@thumbtack/tp-ui-component-form-note'; import '@thumbtack/tp-ui-element-input'; import '@thumbtack/tp-ui-element-label';

Examples

aria-describedby should be used to associate form fields with form notes. The value of aria-describedby must match the form note’s id.

Basic form note

<label class="tp-label" for="input-2781013281341440">Password</label>
<input
    type="password"
    class="tp-text-input"
    id="input-2781013281341440"
    aria-describedby="password-form-note"
/>
<div id="password-form-note" class="tp-form-note">
    Passwords must be at least 8 characters long.
</div>

Form note with an error

<label class="tp-label tp-label--bad-news" for="input-2781013281343234">Email</label>
<input
    type="email"
    class="tp-text-input tp-text-input--bad-news"
    defaultValue="example@example.com"
    id="input-2781013281343234"
    aria-describedby="email-form-note"
/>
<div id="email-form-note" class="tp-form-note tp-form-note--bad-news">
    This email address is already associated with an account.
</div>

FAQs

Package last updated on 30 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts