Skip to content

Commit

Permalink
fix: CDropdownToggle: add role attribute in case of non-button tag
Browse files Browse the repository at this point in the history
  • Loading branch information
woothu committed Jul 17, 2020
1 parent 7c584e4 commit 4de6508
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dropdown/CDropdownToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ const CDropdownToggle = props => {
'aria-expanded': isOpen ? 'true' : 'false',
'aria-haspopup': 'true',
'aria-label': 'Dropdown toggle',
[`${tag && typeof tag === 'string' ? 'ref' : 'innerRef'}`]: setReference
[`${tag && typeof tag === 'string' ? 'ref' : 'innerRef'}`]: setReference,
'role': Tag === CButton ? null : 'button'
}

if (split) {
Expand Down

0 comments on commit 4de6508

Please sign in to comment.