Skip to content

Commit

Permalink
work for the #7071 (#7091)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov authored Oct 6, 2023
1 parent 6cfbbd1 commit a64c980
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
[attr.inputmode]="dropdownModel.inputMode"
[attr.tabindex]="dropdownModel.inputReadOnly ? null : -1"
[attr.disabled]="model.isInputReadOnly ? true : null"
[attr.aria-label]="model.placeholder"
[attr.aria-controls]="dropdownModel.listElementId"
[attr.aria-expanded]="model.ariaExpanded"
[attr.aria-activedescendant]="dropdownModel.ariaActivedescendant"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
[attr.readonly]="!model.searchEnabled ? true : null"
[attr.disabled]="question.isInputReadOnly ? true : null"
[attr.size]="!model.inputStringRendered ? 1 : null"
[attr.aria-label]="question.placeholder"
[attr.aria-controls]="model.listElementId"
[attr.aria-expanded]="question.ariaExpanded"
[attr.aria-activedescendant]="model.ariaActivedescendant"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
:id="question.getInputId()"
:tabindex="model.inputReadOnly ? undefined : -1"
:readonly="!model.searchEnabled ? true : undefined"
:aria-label="question.placeholder"
:aria-expanded="
question.ariaExpanded === null
? undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
:disabled="question.isInputReadOnly"
:inputmode="model.inputMode"
:role="model.filterStringEnabled ? question.ariaRole : undefined"
:aria-label="question.placeholder"
:aria-expanded="
question.ariaExpanded === null
? undefined
Expand Down
3 changes: 1 addition & 2 deletions src/knockout/components/dropdown/dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
<input type="text" autocomplete="off" data-bind="
textInput: model.inputStringRendered,
css: question.cssClasses.filterStringInput,
attr: {
'aria-label': question.placeholder,
attr: {
'aria-expanded': question.ariaExpanded,
'aria-controls': model.listElementId,
'aria-activedescendant': model.ariaActivedescendant,
Expand Down
1 change: 0 additions & 1 deletion src/knockout/components/tagbox/tagbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
size: !model.inputStringRendered ? 1 : null,
id: question.getInputId(),
role: model.filterStringEnabled ? question.ariaRole : undefined,
'aria-label': question.placeholder,
'aria-expanded': question.ariaExpanded,
'aria-controls': model.listElementId,
'aria-activedescendant': model.ariaActivedescendant,
Expand Down
1 change: 0 additions & 1 deletion src/react/dropdown-base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ export class SurveyQuestionDropdownBase<T extends Question> extends SurveyQuesti
ref={(element) => (this.inputElement = element)}
className={this.question.cssClasses.filterStringInput}
role={dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined}
aria-label={this.question.placeholder}
aria-expanded={this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true"}
aria-controls={dropdownListModel.listElementId}
aria-activedescendant={dropdownListModel.ariaActivedescendant}
Expand Down
1 change: 0 additions & 1 deletion src/react/tagbox-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export class TagboxFilterString extends SurveyElementBase<ITagboxFilterProps, an
readOnly={!this.model.searchEnabled ? true : undefined}
size={!this.model.inputStringRendered ? 1 : undefined}
role={this.model.filterStringEnabled ? this.question.ariaRole : undefined}
aria-label={this.question.placeholder}
aria-expanded={this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true"}
aria-controls={this.model.listElementId}
aria-activedescendant={this.model.ariaActivedescendant}
Expand Down
1 change: 0 additions & 1 deletion src/vue/components/dropdown/dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
:id="question.getInputId()"
:tabindex="model.inputReadOnly ? undefined : -1"
:readonly="!model.searchEnabled ? true : null"
:aria-label="question.placeholder"
:aria-expanded="question.ariaExpanded"
:aria-controls="model.listElementId"
:aria-activedescendant="model.ariaActivedescendant"
Expand Down
1 change: 0 additions & 1 deletion src/vue/components/tagbox/tagbox-filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
v-bind:disabled="question.isInputReadOnly"
:inputmode="model.inputMode"
:role="model.filterStringEnabled ? question.ariaRole : null"
:aria-label="question.placeholder"
:aria-expanded="question.ariaExpanded"
:aria-controls="model.listElementId"
:aria-activedescendant="model.ariaActivedescendant"
Expand Down
2 changes: 1 addition & 1 deletion tests/markup/snapshots/dropdown-aria-expanded.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0i_list" aria-expanded="true" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0i_list" aria-expanded="true" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="true" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down
2 changes: 1 addition & 1 deletion tests/markup/snapshots/dropdown-input-string.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<span style="visibility:hidden;">o</span>
<span>rd</span>
</div>
<input aria-controls="testid0i_list" aria-expanded="true" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" inputmode="text" placeholder="" role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="true" autocomplete="off" class="sv_q_dropdown__filter-string-input" inputmode="text" placeholder="" role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div aria-controls="testid0i_list" aria-expanded="false" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<span class="sv-string-viewer">item1</span>
<input aria-controls="testid0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down
2 changes: 1 addition & 1 deletion tests/markup/snapshots/dropdown-select-mobile.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0i_list" aria-expanded="false" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="none" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="none" placeholder="Select..." role="combobox" type="text">
</div>
</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion tests/markup/snapshots/dropdown-select.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0i_list" aria-expanded="false" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion tests/markup/snapshots/dropdown-with-markdown.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div aria-controls="testid0i_list" aria-expanded="false" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<span class="sv-string-viewer">Cat: ![A cat](https://surveyjs.io/Content/Images/examples/markdown/cat.svg =14x14)</span>
<input aria-controls="testid0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down
2 changes: 1 addition & 1 deletion tests/markup/snapshots/dropdown-with-none-value.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div aria-controls="testid0i_list" aria-expanded="false" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<span class="sv-string-viewer">None</span>
<input aria-controls="testid0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down
2 changes: 1 addition & 1 deletion tests/markup/snapshots/dropdown-with-other-value.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div aria-controls="testid0i_list" aria-expanded="false" aria-invalid="false" aria-label="Question title" aria-required="false" class="sv_q_dropdown_control" id="testid0i" role="combobox">
<div class="sv_q_dropdown__value">
<span class="sv-string-viewer">Other (describe)</span>
<input aria-controls="testid0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
<input aria-controls="testid0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0i_0" inputmode="text" placeholder="" role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down
12 changes: 6 additions & 6 deletions tests/markup/snapshots/matrixdynamic-default.snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0row1cell0i_list" aria-expanded="false" aria-invalid="false" aria-label="Column 1" aria-required="false" class="sv_q_dropdown_control" id="testid0row1cell0i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0row1cell0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row1cell0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0row1cell0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row1cell0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down Expand Up @@ -63,7 +63,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0row1cell1i_list" aria-expanded="false" aria-invalid="false" aria-label="Column 2" aria-required="false" class="sv_q_dropdown_control" id="testid0row1cell1i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0row1cell1i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row1cell1i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0row1cell1i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row1cell1i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down Expand Up @@ -102,7 +102,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0row1cell2i_list" aria-expanded="false" aria-invalid="false" aria-label="Column 3" aria-required="false" class="sv_q_dropdown_control" id="testid0row1cell2i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0row1cell2i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row1cell2i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0row1cell2i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row1cell2i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down Expand Up @@ -156,7 +156,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0row3cell0i_list" aria-expanded="false" aria-invalid="false" aria-label="Column 1" aria-required="false" class="sv_q_dropdown_control" id="testid0row3cell0i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0row3cell0i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row3cell0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0row3cell0i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row3cell0i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down Expand Up @@ -195,7 +195,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0row3cell1i_list" aria-expanded="false" aria-invalid="false" aria-label="Column 2" aria-required="false" class="sv_q_dropdown_control" id="testid0row3cell1i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0row3cell1i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row3cell1i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0row3cell1i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row3cell1i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down Expand Up @@ -234,7 +234,7 @@
<div class="sv_select_wrapper">
<div aria-controls="testid0row3cell2i_list" aria-expanded="false" aria-invalid="false" aria-label="Column 3" aria-required="false" class="sv_q_dropdown_control" id="testid0row3cell2i" role="combobox">
<div class="sv_q_dropdown__value">
<input aria-controls="testid0row3cell2i_list" aria-expanded="false" aria-label="Select..." autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row3cell2i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
<input aria-controls="testid0row3cell2i_list" aria-expanded="false" autocomplete="off" class="sv_q_dropdown__filter-string-input" id="testid0row3cell2i_0" inputmode="text" placeholder="Select..." role="combobox" type="text">
</div>
<div class="sv_q_dropdown_clean-button" style="display:none;">
<svg aria-label="Clear" class="sv_q_dropdown_clean-button-svg sv-svg-icon" role="img">
Expand Down
Loading

0 comments on commit a64c980

Please sign in to comment.