Skip to content
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

fix(table): Prevent duplicate scrollbars in certain browsers #8962

Merged
merged 4 commits into from
Mar 19, 2024
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
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
import {
Component,
Element,
Fragment,
h,
Host,
Method,
Prop,
State,
VNode,
Watch,
} from "@stencil/core";
import { Component, Element, h, Host, Method, Prop, State, VNode, Watch } from "@stencil/core";
import { Alignment, Scale } from "../interfaces";
import {
componentFocusable,
Expand Down Expand Up @@ -254,18 +243,16 @@ export class TableCell
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
ref={(el) => (this.containerEl = el)}
>
<span
aria-hidden={true}
aria-live={this.focused ? "polite" : "off"}
class={CSS.assistiveText}
>
{(this.selectionCell || this.readCellContentsToAT) && (
<Fragment>
{this.selectionCell && this.selectionText}
{this.readCellContentsToAT && !this.selectionCell && this.contentsText}
</Fragment>
)}
</span>
{(this.selectionCell || this.readCellContentsToAT) && (
<span
aria-hidden={true}
aria-live={this.focused ? "polite" : "off"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is related to the issue, but this, and similar lines, should be using toAriaBoolean (see example). In its current form, it's setting a boolean on the attribute instead of "true" or "false".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @jcfranco , for some reason this comment just showed up / sent an email notification. Can you open an issue to update and I can fix as this is already merged.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ #8976

class={CSS.assistiveText}
>
{this.selectionCell && this.selectionText}
{this.readCellContentsToAT && !this.selectionCell && this.contentsText}
</span>
)}
<slot onSlotchange={this.updateScreenReaderContentsText} />
</td>
</InteractiveContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,15 @@ export class TableHeader implements LocalizedComponent, LoadableComponent, T9nCo
scale={getIconScale(this.scale)}
/>
)}
<span
aria-hidden={true}
aria-live={this.focused ? "polite" : "off"}
class={CSS.assistiveText}
>
{(this.selectionCell || this.numberCell) && this.screenReaderText}
</span>
{(this.selectionCell || this.numberCell) && (
<span
aria-hidden={true}
aria-live={this.focused ? "polite" : "off"}
class={CSS.assistiveText}
>
{this.screenReaderText}
</span>
)}
</th>
</Host>
);
Expand Down
Loading