Skip to content

Commit

Permalink
feat: improve a11y behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Oct 28, 2024
1 parent 6af214c commit 9387e53
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
margin: 0 16px 0 auto;
}
}
.@{prefixCls}-header-collapsible-only {
.@{prefixCls}-collapsible-header {
cursor: default;
.@{prefixCls}-header-text {
cursor: pointer;
Expand All @@ -68,7 +68,7 @@
cursor: pointer;
}
}
.@{prefixCls}-icon-collapsible-only {
.@{prefixCls}-collapsible-icon {
cursor: default;
.@{prefixCls}-expand-icon {
cursor: pointer;
Expand Down
3 changes: 1 addition & 2 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ const CollapsePanel = React.forwardRef<HTMLDivElement, CollapsePanelProps>((prop
headerClass,
`${prefixCls}-header`,
{
[`${prefixCls}-header-collapsible-only`]: collapsible === 'header',
[`${prefixCls}-icon-collapsible-only`]: collapsible === 'icon',
[`${prefixCls}-collapsible-${collapsible}`]: !!collapsible,
},
customizeClassNames.header,
);
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/index.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`collapse props items should work with nested 1`] = `
<div
aria-disabled="true"
aria-expanded="false"
class="rc-collapse-header"
class="rc-collapse-header rc-collapse-collapsible-disabled"
role="button"
tabindex="-1"
>
Expand Down

0 comments on commit 9387e53

Please sign in to comment.