Skip to content

Commit

Permalink
build the code
Browse files Browse the repository at this point in the history
  • Loading branch information
BenOsodrac committed Aug 30, 2023
1 parent 214bb8a commit 91215ed
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dist/OutSystemsUI.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ declare namespace OSFramework.OSUI.Constants {
Listbox: string;
MenuItem: string;
Option: string;
Presentation: string;
Progressbar: string;
Region: string;
Search: string;
Expand Down Expand Up @@ -1083,6 +1084,7 @@ declare namespace OSFramework.OSUI.Helper {
static RoleListbox(element: HTMLElement): void;
static RoleMenuItem(element: HTMLElement): void;
static RoleOption(element: HTMLElement): void;
static RolePresentation(element: HTMLElement): void;
static RoleProgressBar(element: HTMLElement): void;
static RoleRegion(element: HTMLElement): void;
static RoleSearch(element: HTMLElement): void;
Expand Down
7 changes: 6 additions & 1 deletion dist/OutSystemsUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ var OSFramework;
Listbox: 'listbox',
MenuItem: 'menuitem',
Option: 'option',
Presentation: 'presentation',
Progressbar: 'progressbar',
Region: 'region',
Search: 'search',
Expand Down Expand Up @@ -2987,6 +2988,9 @@ var OSFramework;
static RoleOption(element) {
Helper.Dom.Attribute.Set(element, OSUI.Constants.A11YAttributes.Role.AttrName, OSUI.Constants.A11YAttributes.Role.Option);
}
static RolePresentation(element) {
Helper.Dom.Attribute.Set(element, OSUI.Constants.A11YAttributes.Role.AttrName, OSUI.Constants.A11YAttributes.Role.Presentation);
}
static RoleProgressBar(element) {
Helper.Dom.Attribute.Set(element, OSUI.Constants.A11YAttributes.Role.AttrName, OSUI.Constants.A11YAttributes.Role.Progressbar);
}
Expand Down Expand Up @@ -10632,7 +10636,8 @@ var OSFramework;
}
setA11YProperties(isUpdate = true) {
if (isUpdate === false) {
OSUI.Helper.A11Y.RoleTab(this.selfElement.parentElement);
OSUI.Helper.A11Y.RoleTab(this.selfElement);
OSUI.Helper.A11Y.RolePresentation(this.selfElement.parentElement);
}
if (this._isActive) {
OSUI.Helper.A11Y.TabIndexTrue(this.selfElement);
Expand Down
1 change: 1 addition & 0 deletions src/scripts/OSFramework/OSUI/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace OSFramework.OSUI.Constants {
Listbox: 'listbox',
MenuItem: 'menuitem',
Option: 'option',
Presentation: 'presentation',
Progressbar: 'progressbar',
Region: 'region',
Search: 'search',
Expand Down
11 changes: 11 additions & 0 deletions src/scripts/OSFramework/OSUI/Helper/ManageAccessibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,17 @@ namespace OSFramework.OSUI.Helper {
Dom.Attribute.Set(element, Constants.A11YAttributes.Role.AttrName, Constants.A11YAttributes.Role.Option);
}

/**
* Method that will set the presentation role
*
* @static
* @param {HTMLElement} element
* @memberof A11Y
*/
public static RolePresentation(element: HTMLElement): void {
Dom.Attribute.Set(element, Constants.A11YAttributes.Role.AttrName, Constants.A11YAttributes.Role.Presentation);
}

/**
* Method that will set the progressbar role
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ namespace OSFramework.OSUI.Patterns.TabsHeaderItem {
protected setA11YProperties(isUpdate = true): void {
// Static attribute to be added when the item is created
if (isUpdate === false) {
Helper.A11Y.RoleTab(this.selfElement.parentElement);
Helper.A11Y.RoleTab(this.selfElement);
Helper.A11Y.RolePresentation(this.selfElement.parentElement);
}

// Dynamic values that need to be changed when toggling the active state
Expand Down

0 comments on commit 91215ed

Please sign in to comment.