-
Notifications
You must be signed in to change notification settings - Fork 79
fix: remove aria-disabled from components where necessary #10374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cfa7e39
dcb1810
0390032
f233bfd
54f76ce
0da7577
3290057
05a4157
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import { | |
Watch, | ||
Host, | ||
} from "@stencil/core"; | ||
import { focusElement, focusElementInGroup, toAriaBoolean } from "../../utils/dom"; | ||
import { focusElement, focusElementInGroup } from "../../utils/dom"; | ||
import { | ||
InteractiveComponent, | ||
InteractiveContainer, | ||
|
@@ -235,12 +235,7 @@ export class CardGroup implements InteractiveComponent, LoadableComponent { | |
return ( | ||
<Host> | ||
<InteractiveContainer disabled={this.disabled}> | ||
<div | ||
aria-disabled={toAriaBoolean(this.disabled)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed because the InteractiveContainer will handle setting aria-disabled |
||
aria-label={this.label} | ||
class="container" | ||
role={role} | ||
> | ||
<div aria-label={this.label} class="container" role={role}> | ||
<slot | ||
onSlotchange={this.updateItemsOnSlotChange} | ||
ref={(el) => (this.slotRefEl = el as HTMLSlotElement)} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -374,7 +374,6 @@ export class Card | |
<InteractiveContainer disabled={this.disabled}> | ||
<div | ||
aria-checked={this.selectionMode !== "none" ? toAriaBoolean(this.selected) : undefined} | ||
aria-disabled={this.disabled} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one wasn't using |
||
aria-label={this.label} | ||
class={{ [CSS.contentWrapper]: true, inline: thumbnailInline }} | ||
onClick={this.cardBodyClickHandler} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import { | |
Method, | ||
Watch, | ||
} from "@stencil/core"; | ||
import { focusElementInGroup, slotChangeGetAssignedElements, toAriaBoolean } from "../../utils/dom"; | ||
import { focusElementInGroup, slotChangeGetAssignedElements } from "../../utils/dom"; | ||
import { | ||
InteractiveComponent, | ||
InteractiveContainer, | ||
|
@@ -275,12 +275,7 @@ export class ChipGroup implements InteractiveComponent { | |
|
||
return ( | ||
<InteractiveContainer disabled={disabled}> | ||
<div | ||
aria-disabled={toAriaBoolean(disabled)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed because the InteractiveContainer will handle setting aria-disabled |
||
aria-label={this.label} | ||
class="container" | ||
role={role} | ||
> | ||
<div aria-label={this.label} class="container" role={role}> | ||
<slot | ||
onSlotchange={this.updateItems} | ||
ref={(el) => (this.slotRefEl = el as HTMLSlotElement)} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -413,7 +413,6 @@ export class Chip | |
? toAriaBoolean(this.selected) | ||
: undefined | ||
} | ||
aria-disabled={disableInteraction ? toAriaBoolean(disabled) : undefined} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one was only setting aria-disabled={disableInteraction ? toAriaBoolean(disableInteraction) : undefined} I think we can safely remove this and rely on InteractiveContainer to set aria-disabled. |
||
aria-label={this.label} | ||
class={{ | ||
[CSS.container]: true, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,7 +181,6 @@ export class DatePickerDay implements InteractiveComponent, LoadableComponent { | |
|
||
return ( | ||
<Host | ||
aria-disabled={toAriaBoolean(this.disabled)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed because the InteractiveContainer will handle setting aria-disabled |
||
aria-label={dayLabel} | ||
aria-selected={toAriaBoolean(this.active)} | ||
id={dayId} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -438,7 +438,6 @@ export class Slider | |
|
||
return ( | ||
<div | ||
aria-disabled={this.disabled} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one wasn't using |
||
aria-label={ariaLabel} | ||
aria-orientation="horizontal" | ||
aria-valuemax={this.max} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,7 +222,6 @@ export class TableCell | |
<Host> | ||
<InteractiveContainer disabled={this.disabled}> | ||
<td | ||
aria-disabled={this.disabled} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one wasn't using |
||
class={{ | ||
[CSS.footerCell]: this.parentRowType === "foot", | ||
[CSS.contentCell]: !this.numberCell && !this.selectionCell, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -409,7 +409,6 @@ export class TableRow implements InteractiveComponent, LocalizedComponent { | |
<Host> | ||
<InteractiveContainer disabled={this.disabled}> | ||
<tr | ||
aria-disabled={this.disabled} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one wasn't using |
||
aria-rowindex={this.positionAll + 1} | ||
aria-selected={this.selected} | ||
class={{ [CSS.lastVisibleRow]: this.lastVisibleRow }} | ||
|
Uh oh!
There was an error while loading. Please reload this page.