Skip to content

Commit

Permalink
fix: allow attribure "role" for component aria props
Browse files Browse the repository at this point in the history
  • Loading branch information
jiri.fencl committed Aug 3, 2018
1 parent e262c81 commit 1b75ba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UIComponentHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default class UIComponentHelper {

/**
* Filters the provided properties and returns only the properties which's
* names start with the {@code aria-} prefix.
* names start with the {@code aria-} prefix or role property.
*
* @param {Object<string, *>} props
* @return {Object<string, (number|string)>}
Expand All @@ -157,7 +157,7 @@ export default class UIComponentHelper {
let ariaProps = {};

for (let propertyName of Object.keys(props)) {
if (/^aria-/.test(propertyName)) {
if (/^(aria-|role)/.test(propertyName)) {
ariaProps[propertyName] = props[propertyName];
}
}
Expand Down

0 comments on commit 1b75ba3

Please sign in to comment.