Skip to content

Commit

Permalink
Revert "fix(Collapse): add aria-expanded attribute " (#1759)
Browse files Browse the repository at this point in the history
This reverts commit 2fdf15a.
  • Loading branch information
TheSharpieOne committed Jan 17, 2020
1 parent eb37426 commit 93973be
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/Collapse.js
Expand Up @@ -127,7 +127,6 @@ class Collapse extends Component {
style={{ ...childProps.style, ...style }}
className={classes}
ref={this.props.innerRef}
aria-expanded={isOpen ? 'true' : 'false'}
>
{children}
</Tag>
Expand Down
8 changes: 0 additions & 8 deletions src/__tests__/Collapse.spec.js
Expand Up @@ -122,12 +122,4 @@ describe('Collapse', () => {
expect(wrapper.state('height')).toBe(null);
wrapper.unmount();
});

it('should set aria-expanded', () => {
isOpen = false;
wrapper = mount(<Collapse isOpen={isOpen} />);
expect(wrapper.find('div').prop('aria-expanded')).toBe('false');
toggle();
expect(wrapper.find('div').prop('aria-expanded')).toBe('true');
});
});
10 changes: 0 additions & 10 deletions src/__tests__/UncontrolledCollapse.spec.js
Expand Up @@ -95,14 +95,4 @@ describe('UncontrolledCollapse', () => {

expect(UncontrolledCollapse.prototype.toggle.mock.calls.length).toBe(1);
});

it('should set aria-expanded', () => {
const collapse = mount(<UncontrolledCollapse toggler="#toggler">Yo!</UncontrolledCollapse>);

expect(collapse.find('div').prop('aria-expanded')).toBe('false');
toggler.click();
collapse.update();

expect(collapse.find('div').prop('aria-expanded')).toBe('true');
});
});

0 comments on commit 93973be

Please sign in to comment.