-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: a11y improvements for product configurator group menu (#12348)
Replaces links with buttons, and improves keyboard navigation for the product configurator group menu Closes #12089
- Loading branch information
1 parent
2695f21
commit bab6215
Showing
23 changed files
with
1,189 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
230 changes: 116 additions & 114 deletions
230
feature-libs/product-configurator/rulebased/components/form/configurator-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,134 +1,136 @@ | ||
<ng-container *ngIf="configuration$ | async as configuration"> | ||
<ng-container *ngIf="currentGroup$ | async as currentGroup"> | ||
<ng-container *ngIf="isConflictGroupType(currentGroup.groupType)"> | ||
<cx-configurator-conflict-description | ||
[currentGroup]="currentGroup" | ||
></cx-configurator-conflict-description> | ||
</ng-container> | ||
<div | ||
class="cx-group-attribute" | ||
*ngFor=" | ||
let attribute of currentGroup.attributes; | ||
let indexOfAttribute = index | ||
" | ||
> | ||
<div id="{{ createGroupId(currentGroup.id) }}" role="tabpanel"> | ||
<ng-container *ngIf="isConflictGroupType(currentGroup.groupType)"> | ||
<cx-configurator-conflict-suggestion | ||
<cx-configurator-conflict-description | ||
[currentGroup]="currentGroup" | ||
[attribute]="attribute" | ||
[suggestionNumber]="indexOfAttribute" | ||
></cx-configurator-conflict-suggestion> | ||
></cx-configurator-conflict-description> | ||
</ng-container> | ||
<cx-configurator-attribute-header | ||
[attribute]="attribute" | ||
[owner]="configuration.owner" | ||
[groupId]="currentGroup.id" | ||
[groupType]="currentGroup.groupType" | ||
></cx-configurator-attribute-header> | ||
<div | ||
class="cx-group-attribute" | ||
*ngFor=" | ||
let attribute of currentGroup.attributes; | ||
let indexOfAttribute = index | ||
" | ||
> | ||
<ng-container *ngIf="isConflictGroupType(currentGroup.groupType)"> | ||
<cx-configurator-conflict-suggestion | ||
[currentGroup]="currentGroup" | ||
[attribute]="attribute" | ||
[suggestionNumber]="indexOfAttribute" | ||
></cx-configurator-conflict-suggestion> | ||
</ng-container> | ||
<cx-configurator-attribute-header | ||
[attribute]="attribute" | ||
[owner]="configuration.owner" | ||
[groupId]="currentGroup.id" | ||
[groupType]="currentGroup.groupType" | ||
></cx-configurator-attribute-header> | ||
|
||
<!-- Single Selection Radio Button --> | ||
<cx-configurator-attribute-radio-button | ||
*ngIf="attribute.uiType === uiType.RADIOBUTTON" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-radio-button> | ||
<!-- Single Selection Radio Button --> | ||
<cx-configurator-attribute-radio-button | ||
*ngIf="attribute.uiType === uiType.RADIOBUTTON" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-radio-button> | ||
|
||
<!-- Single Selection Product Bundle --> | ||
<cx-configurator-attribute-single-selection-bundle | ||
(selectionChange)="updateConfiguration($event)" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
*ngIf="attribute.uiType === uiType.RADIOBUTTON_PRODUCT" | ||
></cx-configurator-attribute-single-selection-bundle> | ||
<!-- Single Selection Product Bundle --> | ||
<cx-configurator-attribute-single-selection-bundle | ||
(selectionChange)="updateConfiguration($event)" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
*ngIf="attribute.uiType === uiType.RADIOBUTTON_PRODUCT" | ||
></cx-configurator-attribute-single-selection-bundle> | ||
|
||
<!-- Multi Selection Product Bundle --> | ||
<cx-configurator-attribute-multi-selection-bundle | ||
(selectionChange)="updateConfiguration($event)" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
*ngIf="attribute.uiType === uiType.CHECKBOXLIST_PRODUCT" | ||
></cx-configurator-attribute-multi-selection-bundle> | ||
<!-- Multi Selection Product Bundle --> | ||
<cx-configurator-attribute-multi-selection-bundle | ||
(selectionChange)="updateConfiguration($event)" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
*ngIf="attribute.uiType === uiType.CHECKBOXLIST_PRODUCT" | ||
></cx-configurator-attribute-multi-selection-bundle> | ||
|
||
<!-- Single Selection Dropdown Product Bundle --> | ||
<cx-configurator-attribute-single-selection-bundle-dropdown | ||
*ngIf="attribute.uiType === uiType.DROPDOWN_PRODUCT" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-single-selection-bundle-dropdown> | ||
<!-- Single Selection Dropdown Product Bundle --> | ||
<cx-configurator-attribute-single-selection-bundle-dropdown | ||
*ngIf="attribute.uiType === uiType.DROPDOWN_PRODUCT" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-single-selection-bundle-dropdown> | ||
|
||
<!-- Single Selection Dropdown --> | ||
<cx-configurator-attribute-drop-down | ||
*ngIf="attribute.uiType === uiType.DROPDOWN" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-drop-down> | ||
<cx-configurator-attribute-input-field | ||
*ngIf="attribute.uiType === uiType.STRING" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerType]="configuration.owner.type" | ||
[ownerKey]="configuration.owner.key" | ||
(inputChange)="updateConfiguration($event)" | ||
> | ||
</cx-configurator-attribute-input-field> | ||
<ng-container *ngIf="activeLanguage$ | async as activeLanguage"> | ||
<cx-configurator-attribute-numeric-input-field | ||
*ngIf="attribute.uiType === uiType.NUMERIC" | ||
<!-- Single Selection Dropdown --> | ||
<cx-configurator-attribute-drop-down | ||
*ngIf="attribute.uiType === uiType.DROPDOWN" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-drop-down> | ||
<cx-configurator-attribute-input-field | ||
*ngIf="attribute.uiType === uiType.STRING" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerType]="configuration.owner.type" | ||
[ownerKey]="configuration.owner.key" | ||
[language]="activeLanguage" | ||
(inputChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-numeric-input-field> | ||
</ng-container> | ||
> | ||
</cx-configurator-attribute-input-field> | ||
<ng-container *ngIf="activeLanguage$ | async as activeLanguage"> | ||
<cx-configurator-attribute-numeric-input-field | ||
*ngIf="attribute.uiType === uiType.NUMERIC" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
[language]="activeLanguage" | ||
(inputChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-numeric-input-field> | ||
</ng-container> | ||
|
||
<!-- Multi Selection Checkbox --> | ||
<cx-configurator-attribute-checkbox-list | ||
*ngIf="attribute.uiType === uiType.CHECKBOXLIST" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-checkbox-list> | ||
<cx-configurator-attribute-checkbox | ||
*ngIf="attribute.uiType === uiType.CHECKBOX" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-checkbox> | ||
<cx-configurator-attribute-read-only | ||
*ngIf="attribute.uiType === uiType.READ_ONLY" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
></cx-configurator-attribute-read-only> | ||
<cx-configurator-attribute-multi-selection-image | ||
*ngIf="attribute.uiType === uiType.MULTI_SELECTION_IMAGE" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-multi-selection-image> | ||
<cx-configurator-attribute-single-selection-image | ||
*ngIf="attribute.uiType === uiType.SINGLE_SELECTION_IMAGE" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-single-selection-image> | ||
<!-- Multi Selection Checkbox --> | ||
<cx-configurator-attribute-checkbox-list | ||
*ngIf="attribute.uiType === uiType.CHECKBOXLIST" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-checkbox-list> | ||
<cx-configurator-attribute-checkbox | ||
*ngIf="attribute.uiType === uiType.CHECKBOX" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-checkbox> | ||
<cx-configurator-attribute-read-only | ||
*ngIf="attribute.uiType === uiType.READ_ONLY" | ||
[attribute]="attribute" | ||
[group]="currentGroup.id" | ||
></cx-configurator-attribute-read-only> | ||
<cx-configurator-attribute-multi-selection-image | ||
*ngIf="attribute.uiType === uiType.MULTI_SELECTION_IMAGE" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-multi-selection-image> | ||
<cx-configurator-attribute-single-selection-image | ||
*ngIf="attribute.uiType === uiType.SINGLE_SELECTION_IMAGE" | ||
[attribute]="attribute" | ||
[ownerKey]="configuration.owner.key" | ||
(selectionChange)="updateConfiguration($event)" | ||
></cx-configurator-attribute-single-selection-image> | ||
|
||
<em *ngIf="attribute.uiType === uiType.NOT_IMPLEMENTED">{{ | ||
'configurator.attribute.notSupported' | cxTranslate | ||
}}</em> | ||
<em *ngIf="attribute.uiType === uiType.NOT_IMPLEMENTED">{{ | ||
'configurator.attribute.notSupported' | cxTranslate | ||
}}</em> | ||
|
||
<cx-configurator-attribute-footer | ||
[attribute]="attribute" | ||
[owner]="configuration.owner" | ||
[groupId]="currentGroup.id" | ||
></cx-configurator-attribute-footer> | ||
<cx-configurator-attribute-footer | ||
[attribute]="attribute" | ||
[owner]="configuration.owner" | ||
[groupId]="currentGroup.id" | ||
></cx-configurator-attribute-footer> | ||
</div> | ||
</div> | ||
</ng-container> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.