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

Checkbox|Input: aria-* attributes incorrectly applied #1750

Closed
hoangta79 opened this issue Jun 9, 2017 · 0 comments
Closed

Checkbox|Input: aria-* attributes incorrectly applied #1750

hoangta79 opened this issue Jun 9, 2017 · 0 comments
Labels

Comments

@hoangta79
Copy link

hoangta79 commented Jun 9, 2017

aria-label should be applied at input element level.

import React from 'react'
import { Checkbox } from 'semantic-ui-react'

const CheckboxExampleCheckbox = () => (
  <Checkbox label='Make my profile visible' aria-label="test" />
)

export default CheckboxExampleCheckbox

OR

import React from 'react'
import { Input } from 'semantic-ui-react'

const InputExampleFocus = () => (
  <Input focus placeholder='Search...' aria-label="test" />
)

export default InputExampleFocus

Expected

<div class="column rendered-example modules-checkbox-types-checkbox-example-checkbox">
     <div class="ui checkbox">
                   <input type="checkbox" class="hidden" readonly="" tabindex="0" value="on"  aria-label="test">
                    <label>Make my profile visible</label>
      </div>
</div>

OR

<div class="column rendered-example elements-input-states-input-example-focus">
    <div class="ui focus input">
        <input type="text" placeholder="Search..." aria-label="test" ></div>
    </div>
</div>

Actual

<div class="column rendered-example modules-checkbox-types-checkbox-example-checkbox">
     <div class="ui checkbox" aria-label="test">
                   <input type="checkbox" class="hidden" readonly="" tabindex="0" value="on">
                    <label>Make my profile visible</label>
      </div>
</div>

OR

<div class="column rendered-example elements-input-states-input-example-focus">
    <div class="ui focus input" aria-label="test">
        <input type="text" placeholder="Search..." ></div>
    </div>
</div>

Version

0.68.4

@layershifter layershifter changed the title Applying aria-* attributes incorrectly for input types (text, checkbox, radio...) Checkbox|Input: aria-* attributes incorrectly applied Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants