Skip to content

Commit

Permalink
Accessibility A (#3688)
Browse files Browse the repository at this point in the history
  • Loading branch information
edloidas committed Sep 12, 2024
1 parent 2841cba commit 22b6591
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 64 deletions.
12 changes: 6 additions & 6 deletions src/main/resources/assets/admin/common/js/app/bar/AppBar.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {DivEl} from '../../dom/DivEl';
import {Action} from '../../ui/Action';
import {ActionContainer} from '../../ui/ActionContainer';
import {ResponsiveManager} from '../../ui/responsive/ResponsiveManager';
import {Action} from '../../ui/Action';
import {ShowAppLauncherAction} from './ShowAppLauncherAction';
import {AppIcon} from './AppIcon';
import {AppBarActions} from './AppBarActions';
import {Application} from '../Application';
import {IWCAG as WCAG, AriaRole} from '../../ui/WCAG';
import {AriaRole, WCAG} from '../../ui/WCAG';
import {i18n} from '../../util/Messages';
import {Application} from '../Application';
import {AppBarActions} from './AppBarActions';
import {AppIcon} from './AppIcon';
import {ShowAppLauncherAction} from './ShowAppLauncherAction';

export class AppBar
extends DivEl
Expand Down
22 changes: 11 additions & 11 deletions src/main/resources/assets/admin/common/js/dom/Element.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import * as DOMPurify from 'dompurify';
import * as $ from 'jquery';
import 'jquery-ui/ui/tabbable';
import * as Q from 'q';
import {ClassHelper} from '../ClassHelper';
import {ObjectHelper} from '../ObjectHelper';
import {StyleHelper} from '../StyleHelper';
import {KeyHelper} from '../ui/KeyHelper';
import {AriaHasPopup, AriaRole, WCAG} from '../ui/WCAG';
import {assert, assertNotNull, assertState} from '../util/Assert';
import {StringHelper} from '../util/StringHelper';
import {ObjectHelper} from '../ObjectHelper';
import {ClassHelper} from '../ClassHelper';
import {ElementHelper} from './ElementHelper';
import {ElementAddedEvent} from './ElementAddedEvent';
import {ElementEvent} from './ElementEvent';
import {ElementHelper} from './ElementHelper';
import {ElementHiddenEvent} from './ElementHiddenEvent';
import {ElementRegistry} from './ElementRegistry';
import {ElementRemovedEvent} from './ElementRemovedEvent';
import {ElementRenderedEvent} from './ElementRenderedEvent';
import {ElementShownEvent} from './ElementShownEvent';
import {ElementHiddenEvent} from './ElementHiddenEvent';
import {ElementRegistry} from './ElementRegistry';
import {assert, assertNotNull, assertState} from '../util/Assert';
import {ElementEvent} from './ElementEvent';
import * as DOMPurify from 'dompurify';
import {IWCAG as WCAG, AriaRole, AriaHasPopup, IWCAG} from '../ui/WCAG';
import {KeyHelper} from '../ui/KeyHelper';

export interface PurifyConfig {
addTags?: string[];
Expand Down Expand Up @@ -237,7 +237,7 @@ export class Element {
}
}

applyWCAGAttributes(attr?: IWCAG): void {
applyWCAGAttributes(attr?: WCAG): void {
if (!ObjectHelper.isDefined(attr) && !this.implementsWCAG()) {
return;
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/assets/admin/common/js/ui/Action.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Q from 'q';
import {ObjectHelper} from '../ObjectHelper';
import {KeyBinding} from './KeyBinding';
import {Mnemonic} from './Mnemonic';
import {IWCAG} from './WCAG';
import {ObjectHelper} from '../ObjectHelper';
import {WCAG} from './WCAG';

type ExecutionListener = (action: Action) => Q.Promise<any> | void;

Expand Down Expand Up @@ -36,7 +36,7 @@ export class Action {

private parentAction: Action;

private wcag?: IWCAG;
private wcag?: WCAG;

private sortOrder: number = 10;

Expand Down Expand Up @@ -153,7 +153,7 @@ export class Action {
return this;
}

setWcagAttributes(wcag: IWCAG): Action {
setWcagAttributes(wcag: WCAG): Action {
this.wcag = wcag;
return this;
}
Expand All @@ -162,7 +162,7 @@ export class Action {
return ObjectHelper.isDefined(this.wcag);
}

getWcagAttributes(): IWCAG {
getWcagAttributes(): WCAG {
return this.wcag;
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/assets/admin/common/js/ui/WCAG.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const IWCAG = Symbol('IWCAG');
export const WCAG = Symbol('WCAG');

export interface IWCAG {
[IWCAG]?: boolean;
export interface WCAG {
[WCAG]?: boolean;
tabbable?: boolean;
role?: AriaRole | '';
ariaLabel?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {Button} from './Button';
import {KeyBindings} from '../KeyBindings';
import {Action} from '../Action';
import {Tooltip} from '../Tooltip';
import {BrowserHelper} from '../../BrowserHelper';
import {KeyBindingAction} from '../KeyBinding';
import {IWCAG} from '../WCAG';
import {KeyHelper} from '../KeyHelper';
import {Body} from '../../dom/Body';
import {Action} from '../Action';
import {KeyBindingAction} from '../KeyBinding';
import {KeyBindings} from '../KeyBindings';
import {Tooltip} from '../Tooltip';
import {WCAG} from '../WCAG';
import {Button} from './Button';

export class ActionButton
extends Button {
Expand All @@ -17,7 +16,7 @@ export class ActionButton

private iconClass: string;

constructor(action: Action, wcag?: IWCAG) {
constructor(action: Action, wcag?: WCAG) {
super();

this.addClass('action-button');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ButtonEl} from '../../dom/ButtonEl';
import {AriaRole, IWCAG as WCAG} from '../WCAG';
import {AriaRole, WCAG} from '../WCAG';

export class DropdownHandle
extends ButtonEl {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import {Menu} from '../menu/Menu';
import {MenuItem} from '../menu/MenuItem';
import * as Q from 'q';
import {Body} from '../../dom/Body';
import {DivEl} from '../../dom/DivEl';
import {Element} from '../../dom/Element';
import {Action} from '../Action';
import {DropdownHandle} from './DropdownHandle';
import {Menu} from '../menu/Menu';
import {MenuItem} from '../menu/MenuItem';
import {AriaRole, WCAG} from '../WCAG';
import {ActionButton} from './ActionButton';
import {Body} from '../../dom/Body';
import {Element} from '../../dom/Element';
import * as Q from 'q';
import {AriaRole, IWCAG as WCAG} from '../WCAG';
import {KeyHelper} from '../KeyHelper';
import * as $ from 'jquery';
import {DropdownHandle} from './DropdownHandle';

export enum MenuButtonDropdownPos {
LEFT, RIGHT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import {i18n} from '../../util/Messages';
import {Body} from '../../dom/Body';
import {DivEl} from '../../dom/DivEl';
import {SpanEl} from '../../dom/SpanEl';
import {Element} from '../../dom/Element';
import {SpanEl} from '../../dom/SpanEl';
import {StyleHelper} from '../../StyleHelper';
import {Body} from '../../dom/Body';
import {BrowserHelper} from '../../BrowserHelper';
import {AriaHasPopup, AriaRole, IWCAG as WCAG} from '../WCAG';
import {i18n} from '../../util/Messages';
import {AriaHasPopup, AriaRole, WCAG} from '../WCAG';

export class FoldButton
extends DivEl
Expand Down
16 changes: 8 additions & 8 deletions src/main/resources/assets/admin/common/js/ui/toolbar/Toolbar.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {ActionButton} from '../button/ActionButton';
import {i18n} from '../../util/Messages';
import {Body} from '../../dom/Body';
import {DivEl} from '../../dom/DivEl';
import {ActionContainer} from '../ActionContainer';
import {Element} from '../../dom/Element';
import {ObjectHelper} from '../../ObjectHelper';
import {i18n} from '../../util/Messages';
import {Action} from '../Action';
import {ActionContainer} from '../ActionContainer';
import {ActionButton} from '../button/ActionButton';
import {KeyHelper} from '../KeyHelper';
import {ResponsiveManager} from '../responsive/ResponsiveManager';
import {Element} from '../../dom/Element';
import {AriaRole, WCAG} from '../WCAG';
import {FoldButton} from './FoldButton';
import {IWCAG as WCAG, AriaRole} from '../WCAG';
import {KeyHelper} from '../KeyHelper';
import {Body} from '../../dom/Body';
import {ObjectHelper} from '../../ObjectHelper';

interface ToolbarElement {
el: Element | ActionButton;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,6 @@ body {
}
}
}

&.IE {
@media screen and (min-width: 720px) {
.@{_COMMON_PREFIX}modal-dialog {
transform: translate(-50%, -50%);
}
}
}
}

.cancel-button-inline() {
Expand Down

0 comments on commit 22b6591

Please sign in to comment.