Skip to content

Commit

Permalink
More accessible name tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Nov 28, 2019
1 parent 4a5a2fb commit dacacce
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/material-ui/src/TextField/TextField.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,7 @@ describe('<TextField />', () => {
</TextField>,
);

const label = getByRole('button')
.getAttribute('aria-labelledby')
.split(' ')
.map(idref => document.getElementById(idref))
.reduce((partial, element) => `${partial} ${element.textContent}`, '');
// this whitespace is ok since actual AT will only use so called "flat strings"
// https://w3c.github.io/accname/#mapping_additional_nd_te
expect(label).to.equal(' Release: Stable');
expect(getByRole('button')).to.have.accessibleName('Release: Stable');
});

it('creates an input[hidden] that has no accessible properties', () => {
Expand Down

0 comments on commit dacacce

Please sign in to comment.