Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Add RTL examples for `Button` and `Divider` components @mnajdova ([#792](https://github.com/stardust-ui/react/pull/792))
- Add mechanism for marking icons that should rotate in RTL in Teams theme; marked icons: `send`, `bullets`, `leave`, `outdent`, `redo`, `undo`, `send` @mnajdova ([#788](https://github.com/stardust-ui/react/pull/788))
- Remove ability to introduce global style overrides for HTML document from `pxToRem` @kuzhelov ([#789](https://github.com/stardust-ui/react/pull/789))
- Remove handledProps from behaviors @jurokapsiar ([#805](https://github.com/stardust-ui/react/pull/805))

### Fixes
- Handle `onClick` and `onFocus` on ListItems correctly @layershifter ([#779](https://github.com/stardust-ui/react/pull/779))
Expand Down
9 changes: 0 additions & 9 deletions src/lib/accessibility/Behaviors/Menu/menuItemBehavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ const menuItemBehavior: Accessibility = (props: any) => ({
},
},

handledProps: [
'aria-label',
'aria-labelledby',
'aria-describedby',
'aria-expanded',
'aria-haspopup',
'aria-disabled',
],

keyActions: {
wrapper: {
performClick: {
Expand Down
9 changes: 1 addition & 8 deletions src/lib/accessibility/Behaviors/Tab/tabBehavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ const tabBehavior: Accessibility = (props: any) => ({
[IS_FOCUSABLE_ATTRIBUTE]: !props['disabled'],
},
},
handledProps: [
'aria-label',
'aria-labelledby',
'aria-describedby',
'aria-controls',
'aria-selected',
'aria-disabled',
],

keyActions: {
wrapper: {
performClick: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ const toolbarButtonBehavior: Accessibility = (props: any) => ({
},
},

handledProps: [
'aria-label',
'aria-labelledby',
'aria-describedby',
'aria-disabled',
'aria-expanded',
'aria-haspopup',
],

keyActions: {
wrapper: {
performClick: {
Expand Down
1 change: 0 additions & 1 deletion src/lib/accessibility/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export type KeyActions = { [partName: string]: { [actionName: string]: KeyAction
export interface AccessibilityDefinition {
attributes?: AccessibilityAttributesBySlot
keyActions?: KeyActions
handledProps?: (keyof AccessibilityAttributes)[]
focusZone?: FocusZoneDefinition
focusTrap?: FocusTrapDefinition
}
Expand Down
5 changes: 1 addition & 4 deletions src/lib/renderComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ const renderComponent = <P extends {}>(config: RenderConfig<P>): React.ReactElem
rtl,
)

const unhandledProps = getUnhandledProps(
{ handledProps: [...handledProps, ...accessibility.handledProps] },
props,
)
const unhandledProps = getUnhandledProps({ handledProps }, props)

const colors = generateColorScheme(stateAndProps.color, resolvedVariables.colorScheme)

Expand Down