reactstrap icon indicating copy to clipboard operation
reactstrap copied to clipboard

DropdownToggle aria-haspopup should accept string value

Open uiii opened this issue 6 years ago • 3 comments

  • components: DropdownToggle
  • reactstrap version #8.5.1
  • react version #16.13.1
  • bootstrap version #4.5.2
  • typescript version #3.9.7
  • @types/react version #16.9.49
  • @types/reactstrap version #8.5.1

What is happening?

I'm using typescript and when I try to set a string value (listbox) to aria-haspopup prop I got this error:

Warning: Failed prop type: Invalid prop `aria-haspopup` of type `string` supplied to `DropdownToggle`, expected `boolean`.

I know this is related to the typings library (@types/reactstrap) but the prop types of DropdownToggle has wrong typing as well:

#reactstrap/src/DropdownToggle.js

...
const propTypes = {
  ...
  'aria-haspopup': PropTypes.bool,
  ...
};

What should be happening?

aria-haspopup prop should accept string value according to the spec https://www.w3.org/TR/wai-aria/#aria-haspopup

uiii avatar Sep 06 '20 07:09 uiii

Hi! I'd like to take a stab at this. I've forked the repo and I'm gonna start working on it today.

andyseracuse avatar Dec 23 '20 16:12 andyseracuse

okay! I just PR'd thanks so much for any feedback!

andyseracuse avatar Dec 23 '20 19:12 andyseracuse

Fixed in #2077

kyletsang avatar Jan 28 '21 18:01 kyletsang