Skip to content

Commit

Permalink
Merge branch 'master' into inline-dropdown-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored Jan 31, 2020
2 parents bd14f59 + d6a36a9 commit d3122ce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
7 changes: 3 additions & 4 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -6395,7 +6395,6 @@ $text-02: if(
- [modal [mixin]](#modal-mixin)
- [overflow-menu [mixin]](#overflow-menu-mixin)
- [pagination [mixin]](#pagination-mixin)
- [search [mixin]](#search-mixin)
- [tabs [mixin]](#tabs-mixin)
- [toggle [mixin]](#toggle-mixin)
- [toolbar [mixin]](#toolbar-mixin)
Expand Down Expand Up @@ -6568,6 +6567,7 @@ $icon-02: if(
- [file-uploader [mixin]](#file-uploader-mixin)
- [listbox [mixin]](#listbox-mixin)
- [overflow-menu [mixin]](#overflow-menu-mixin)
- [search [mixin]](#search-mixin)
- [text-input [mixin]](#text-input-mixin)
- [tile [mixin]](#tile-mixin)
- [tooltip--icon--legacy [mixin]](#tooltip--icon--legacy-mixin)
Expand Down Expand Up @@ -20934,8 +20934,7 @@ Search styles
width: rem(16px);
top: 50%;
transform: translateY(-50%);
// Ensure clear icon is rendered in Firefox (#1127)
fill: $text-02;
fill: $icon-02;
pointer-events: none;
}

Expand Down Expand Up @@ -21083,7 +21082,7 @@ Search styles
- [ui-04 [variable]](#ui-04-variable)
- [text-05 [variable]](#text-05-variable)
- [field-02 [variable]](#field-02-variable)
- [text-02 [variable]](#text-02-variable)
- [icon-02 [variable]](#icon-02-variable)
- [carbon--spacing-01 [variable]](#carbon--spacing-01-variable)
- [icon-01 [variable]](#icon-01-variable)
- [hover-field [variable]](#hover-field-variable)
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/search/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@
width: rem(16px);
top: 50%;
transform: translateY(-50%);
// Ensure clear icon is rendered in Firefox (#1127)
fill: $text-02;
fill: $icon-02;
pointer-events: none;
}

Expand Down
8 changes: 2 additions & 6 deletions packages/react/src/components/Tab/Tab-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ describe('Tab', () => {
);
});

it('renders <li> with [role="presentation"]', () => {
expect(wrapper.props().role).toEqual('presentation');
});

it('renders <a> with [role="tab"]', () => {
expect(wrapper.find('a').props().role).toEqual('tab');
it('renders <li> with [role="tab"]', () => {
expect(wrapper.props().role).toEqual('tab');
});

it('renders <a> with tabindex set to 0', () => {
Expand Down
10 changes: 4 additions & 6 deletions packages/react/src/components/Tab/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,7 @@ export default class Tab extends React.Component {
id,
className: `${prefix}--tabs__nav-link`,
href,
role: 'tab',
tabIndex: !disabled ? tabIndex : -1,
['aria-selected']: selected,
['aria-disabled']: disabled,
['aria-controls']: id && `${id}__panel`,
ref: e => {
this.tabAnchor = e;
},
Expand All @@ -164,8 +160,10 @@ export default class Tab extends React.Component {
handleTabKeyDown(index, evt);
onKeyDown(evt);
}}
role="presentation"
selected={selected}>
role="tab"
aria-selected={selected}
aria-disabled={disabled}
aria-controls={`${id}__panel`}>
{renderAnchor ? (
renderAnchor(anchorProps)
) : (
Expand Down

0 comments on commit d3122ce

Please sign in to comment.