Skip to content

Commit

Permalink
work for the #8460
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed Jun 26, 2024
1 parent 4ea234c commit 9789cac
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@ export class Question extends SurveyElement<Question>
public get a11y_input_ariaRole(): string {
return null;
}
public get a11y_input_ariaRequired(): "true" | "false" | null {
public get a11y_input_ariaRequired(): "true" | "false" {
return this.isRequired ? "true" : "false";
}
public get a11y_input_ariaInvalid(): "true" | "false" {
Expand Down
2 changes: 1 addition & 1 deletion src/question_checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ export class QuestionCheckboxModel extends QuestionCheckboxBase {
public get a11y_input_ariaRole(): string {
return "group";
}
public get a11y_input_ariaRequired(): "true" | "false" | null {
public get a11y_input_ariaRequired(): "true" | "false" {
return null;
}
// EO a11y
Expand Down
2 changes: 2 additions & 0 deletions tests/markup/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ function clearAttributes(el: Element, removeIds = false) {
}
if(el.hasAttribute("readonly"))
el.setAttribute("readonly", "");
if(el.hasAttribute("required"))
el.setAttribute("required", "");
if (el.hasAttribute("disabled"))
el.setAttribute("disabled", "");
if(el.hasAttribute("ng-reflect-value")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<legend class="sv-hidden">row row1, column col2</legend>
<div class="sd-checkbox sd-checkbox--allowhover sd-item sd-item--allowhover sd-selectbase__item sd-selectbase__item--inline" role="presentation">
<label class="sd-selectbase__label">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_0" name="col2Item 1" required="true" type="checkbox" value="Item 1">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_0" name="col2Item 1" required="" type="checkbox" value="Item 1">
<span class="sd-checkbox__decorator sd-item__decorator">
<svg class="sd-checkbox__svg sd-item__svg">
<use xlink:href="#icon-v2check" class="">
Expand All @@ -67,7 +67,7 @@
</div>
<div class="sd-checkbox sd-checkbox--allowhover sd-item sd-item--allowhover sd-selectbase__item sd-selectbase__item--inline" role="presentation">
<label class="sd-selectbase__label">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_1" name="col2Item 2" required="true" type="checkbox" value="Item 2">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_1" name="col2Item 2" required="" type="checkbox" value="Item 2">
<span class="sd-checkbox__decorator sd-item__decorator">
<svg class="sd-checkbox__svg sd-item__svg">
<use xlink:href="#icon-v2check" class="">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="sd-table__question-wrapper">
<div class="sd-checkbox sd-checkbox--allowhover sd-item sd-item--allowhover sd-selectbase__item sd-selectbase__item--inline" role="presentation">
<label class="sd-selectbase__label">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_0" name="col2Item 1" required="true" type="checkbox" value="Item 1">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_0" name="col2Item 1" required="" type="checkbox" value="Item 1">
<span class="sd-checkbox__decorator sd-item__decorator">
<svg class="sd-checkbox__svg sd-item__svg">
<use xlink:href="#icon-v2check" class="">
Expand All @@ -50,7 +50,7 @@
<div class="sd-table__question-wrapper">
<div class="sd-checkbox sd-checkbox--allowhover sd-item sd-item--allowhover sd-selectbase__item sd-selectbase__item--inline" role="presentation">
<label class="sd-selectbase__label">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_1" name="col2Item 2" required="true" type="checkbox" value="Item 2">
<input class="sd-checkbox__control sd-item__control sd-visuallyhidden" id="testid0row1cell3i_1" name="col2Item 2" required="" type="checkbox" value="Item 2">
<span class="sd-checkbox__decorator sd-item__decorator">
<svg class="sd-checkbox__svg sd-item__svg">
<use xlink:href="#icon-v2check" class="">
Expand Down

0 comments on commit 9789cac

Please sign in to comment.