Skip to content

Commit eabd37e

Browse files
karenrasmussensanticomp2014
authored andcommitted
Name, Role, Value
1 parent 5589e5c commit eabd37e

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/sidebar/components/ThreadCard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ function ThreadCard({ frameSync, thread }: ThreadCardProps) {
8282
data-testid="thread-card"
8383
elementRef={cardRef}
8484
tabIndex={0}
85-
role="article"
86-
aria-label="Press Enter to scroll annotation into view"
85+
aria-description="Press Enter to scroll annotation into view"
8786
onClick={e => {
8887
// Prevent click events intended for another action from
8988
// triggering a page scroll.

src/sidebar/components/search/FilterControls.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,11 @@ function FilterToggle({
6767
})}
6868
disabled={disabled}
6969
onClick={() => setActive(!active)}
70-
pressed={active}
7170
variant="custom"
7271
title={description}
7372
>
7473
{IconComponent && <IconComponent className="w-em h-em" />}
75-
<span className="max-w-36 truncate">{label}</span>
74+
<span className="max-w-56 truncate">{label}</span>
7675
<div
7776
// Vertical divider line between label and active/inactive state.
7877
// This should fill the button vertically.
@@ -161,7 +160,7 @@ export default function FilterControls({
161160
<b>Filters</b>
162161
{hasSelection && (
163162
<FilterToggle
164-
label={`${selectedCount} selected`}
163+
label={`Remove ${selectedCount} selected annotation filter`}
165164
description={`Show ${selectedCount} selected annotations`}
166165
active={true}
167166
setActive={() => store.clearSelection()}

src/sidebar/components/search/test/FilterControls-test.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ describe('FilterControls', () => {
4848
return this.button.text();
4949
}
5050

51-
/** Return true if button is rendered in the active state. */
52-
isActive() {
53-
return this.button.prop('pressed');
54-
}
55-
5651
click() {
5752
this.button.find('button').simulate('click');
5853
}
@@ -75,7 +70,6 @@ describe('FilterControls', () => {
7570
const wrapper = createComponent();
7671
const toggle = new ToggleButtonWrapper(wrapper, 'selection-toggle');
7772
assert.isTrue(toggle.exists());
78-
assert.isTrue(toggle.isActive());
7973

8074
toggle.click();
8175

@@ -127,14 +121,13 @@ describe('FilterControls', () => {
127121
fakeStore.getFocusFilters.returns(focusFilters);
128122
fakeStore.getFocusActive.returns(new Set([filterType]));
129123

130-
// Toggle should be displayed and active.
124+
// Toggle should be displayed.
131125
const wrapper = createComponent();
132126
const toggle = new ToggleButtonWrapper(
133127
wrapper,
134128
`${filterType}-focus-toggle`,
135129
);
136130
assert.isTrue(toggle.exists());
137-
assert.isTrue(toggle.isActive());
138131
assert.equal(toggle.label(), label);
139132

140133
toggle.click();
@@ -145,7 +138,6 @@ describe('FilterControls', () => {
145138
fakeStore.getFocusActive.returns(new Set());
146139
wrapper.setProps({});
147140
toggle.update();
148-
assert.isFalse(toggle.isActive());
149141
});
150142
});
151143

0 commit comments

Comments
 (0)