@readium/shared
Version:
Shared models to be used across other Readium projects and implementations in Typescript
197 lines (196 loc) • 7.9 kB
TypeScript
/**
* Holds the accessibility metadata of a Publication.
*
* https://www.w3.org/2021/a11y-discov-vocab/latest/
* https://readium.org/webpub-manifest/schema/a11y.schema.json
*/
export declare class Accessibility {
/**
* An established standard to which the described resource conforms.
*/
conformsTo: AccessibilityProfile[];
/**
* Certification of accessible publications.
*/
certification: Certification | null;
/**
* A human-readable summary of specific accessibility features or deficiencies.
*/
summary: string | null;
/**
* The human sensory perceptual system through which a person may process or perceive information.
*/
accessMode: AccessMode[];
/**
* A list of single or combined accessModes that are sufficient to understand all the intellectual content.
*/
accessModeSufficient: PrimaryAccessMode[];
/**
* Content features of the resource.
*/
feature: Feature[];
/**
* A characteristic of the described resource that is physiologically dangerous to some users.
*/
hazard: Hazard[];
/**
* Justifications for non-conformance based on exemptions in a given jurisdiction.
*/
exemption: Exemption[];
constructor(values?: {
conformsTo?: AccessibilityProfile[];
certification?: Certification | null;
summary?: string | null;
accessMode?: AccessMode[];
accessModeSufficient?: PrimaryAccessMode[];
feature?: Feature[];
hazard?: Hazard[];
exemption?: Exemption[];
});
/**
* Parses an [Accessibility] from its RWPM JSON representation.
*/
static deserialize(json: Record<string, any> | string): Accessibility | undefined;
/**
* Serializes an [Accessibility] to its RWPM JSON representation.
*/
serialize(): Record<string, any>;
}
export declare class AccessibilityProfile {
readonly uri: string;
constructor(uri: string);
static deserialize(json: any): AccessibilityProfile | undefined;
serialize(): any;
static readonly EPUB_A11Y_10_WCAG_20_A: AccessibilityProfile;
static readonly EPUB_A11Y_10_WCAG_20_AA: AccessibilityProfile;
static readonly EPUB_A11Y_10_WCAG_20_AAA: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_20_A: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_20_AA: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_20_AAA: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_21_A: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_21_AA: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_21_AAA: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_22_A: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_22_AA: AccessibilityProfile;
static readonly EPUB_A11Y_11_WCAG_22_AAA: AccessibilityProfile;
get isWCAGLevelA(): boolean;
get isWCAGLevelAA(): boolean;
get isWCAGLevelAAA(): boolean;
}
export declare class Certification {
readonly certifiedBy: string | null;
readonly credential: string | null;
readonly report: string | null;
constructor(certifiedBy?: string | null, credential?: string | null, report?: string | null);
static deserialize(json: any): Certification | undefined;
serialize(): Record<string, any>;
}
export declare class AccessMode {
readonly value: string;
constructor(value: string);
static deserialize(json: any): AccessMode | undefined;
serialize(): any;
static readonly AUDITORY: AccessMode;
static readonly CHART_ON_VISUAL: AccessMode;
static readonly CHEM_ON_VISUAL: AccessMode;
static readonly COLOR_DEPENDENT: AccessMode;
static readonly DIAGRAM_ON_VISUAL: AccessMode;
static readonly MATH_ON_VISUAL: AccessMode;
static readonly MUSIC_ON_VISUAL: AccessMode;
static readonly TACTILE: AccessMode;
static readonly TEXT_ON_VISUAL: AccessMode;
static readonly TEXTUAL: AccessMode;
static readonly VISUAL: AccessMode;
}
export declare class PrimaryAccessMode {
readonly value: string | string[];
private static readonly VALID_MODES;
constructor(value: string | string[]);
static deserialize(json: any): PrimaryAccessMode | undefined;
serialize(): string | string[];
static readonly AUDITORY: PrimaryAccessMode;
static readonly TACTILE: PrimaryAccessMode;
static readonly TEXTUAL: PrimaryAccessMode;
static readonly VISUAL: PrimaryAccessMode;
}
export declare class Feature {
readonly value: string;
constructor(value: string);
static deserialize(json: any): Feature | undefined;
serialize(): any;
static readonly NONE: Feature;
static readonly ANNOTATIONS: Feature;
static readonly ARIA: Feature;
static readonly INDEX: Feature;
static readonly PAGE_BREAK_MARKERS: Feature;
static readonly PAGE_NAVIGATION: Feature;
static readonly PRINT_PAGE_NUMBERS: Feature;
static readonly READING_ORDER: Feature;
static readonly STRUCTURAL_NAVIGATION: Feature;
static readonly TABLE_OF_CONTENTS: Feature;
static readonly TAGGED_PDF: Feature;
static readonly ALTERNATIVE_TEXT: Feature;
static readonly AUDIO_DESCRIPTION: Feature;
static readonly CAPTIONS: Feature;
static readonly CLOSED_CAPTIONS: Feature;
static readonly DESCRIBED_MATH: Feature;
static readonly LONG_DESCRIPTION: Feature;
static readonly OPEN_CAPTIONS: Feature;
static readonly SIGN_LANGUAGE: Feature;
static readonly TRANSCRIPT: Feature;
static readonly DISPLAY_TRANSFORMABILITY: Feature;
static readonly SYNCHRONIZED_AUDIO_TEXT: Feature;
static readonly TIMING_CONTROL: Feature;
static readonly UNLOCKED: Feature;
static readonly CHEM_ML: Feature;
static readonly LATEX: Feature;
static readonly LATEX_CHEMISTRY: Feature;
static readonly MATH_ML: Feature;
static readonly MATH_ML_CHEMISTRY: Feature;
static readonly TTS_MARKUP: Feature;
static readonly HIGH_CONTRAST_AUDIO: Feature;
static readonly HIGH_CONTRAST_DISPLAY: Feature;
static readonly LARGE_PRINT: Feature;
static readonly BRAILLE: Feature;
static readonly TACTILE_GRAPHIC: Feature;
static readonly TACTILE_OBJECT: Feature;
static readonly FULL_RUBY_ANNOTATIONS: Feature;
static readonly HORIZONTAL_WRITING: Feature;
static readonly RUBY_ANNOTATIONS: Feature;
static readonly VERTICAL_WRITING: Feature;
static readonly WITH_ADDITIONAL_WORD_SEGMENTATION: Feature;
static readonly WITHOUT_ADDITIONAL_WORD_SEGMENTATION: Feature;
}
export declare class Hazard {
readonly value: string;
constructor(value: string);
static deserialize(json: any): Hazard | undefined;
serialize(): any;
static readonly FLASHING: Hazard;
static readonly NO_FLASHING_HAZARD: Hazard;
static readonly UNKNOWN_FLASHING_HAZARD: Hazard;
static readonly MOTION_SIMULATION: Hazard;
static readonly NO_MOTION_SIMULATION_HAZARD: Hazard;
static readonly UNKNOWN_MOTION_SIMULATION_HAZARD: Hazard;
static readonly SOUND: Hazard;
static readonly NO_SOUND_HAZARD: Hazard;
static readonly UNKNOWN_SOUND_HAZARD: Hazard;
static readonly UNKNOWN: Hazard;
static readonly NONE: Hazard;
}
export declare class Exemption {
readonly value: string;
constructor(value: string);
static deserialize(json: any): Exemption | undefined;
serialize(): any;
static readonly NONE: Exemption;
static readonly DOCUMENTED: Exemption;
static readonly LEGAL: Exemption;
static readonly TEMPORARY: Exemption;
static readonly TECHNICAL: Exemption;
static readonly EAA_DISPROPORTIONATE_BURDEN: Exemption;
static readonly EAA_FUNDAMENTAL_ALTERATION: Exemption;
static readonly EAA_MICROENTERPRISE: Exemption;
static readonly EAA_TECHNICAL_IMPOSSIBILITY: Exemption;
static readonly EAA_TEMPORARY: Exemption;
}