@readium/shared
Version:
Shared models to be used across other Readium projects and implementations in Typescript
518 lines (517 loc) • 14.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);
/**
* Parses an [AccessibilityProfile] from its RWPM JSON representation.
*/
static deserialize(json: any): AccessibilityProfile | undefined;
/**
* Serializes an [AccessibilityProfile] to its RWPM JSON representation.
*/
serialize(): any;
/**
* EPUB Accessibility 1.0 WCAG 2.0 A – http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a
*/
static readonly EPUB_A11Y_10_WCAG_20_A: AccessibilityProfile;
/**
* EPUB Accessibility 1.0 WCAG 2.0 AA – http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa
*/
static readonly EPUB_A11Y_10_WCAG_20_AA: AccessibilityProfile;
/**
* EPUB Accessibility 1.0 WCAG 2.0 AAA – http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa
*/
static readonly EPUB_A11Y_10_WCAG_20_AAA: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.0 A – https://www.w3.org/TR/epub-a11y-11#wcag-2.0-a
*/
static readonly EPUB_A11Y_11_WCAG_20_A: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.0 AA – https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aa
*/
static readonly EPUB_A11Y_11_WCAG_20_AA: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.0 AAA – https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aaa
*/
static readonly EPUB_A11Y_11_WCAG_20_AAA: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.1 A – https://www.w3.org/TR/epub-a11y-11#wcag-2.1-a
*/
static readonly EPUB_A11Y_11_WCAG_21_A: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.1 AA – https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aa
*/
static readonly EPUB_A11Y_11_WCAG_21_AA: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.1 AAA – https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aaa
*/
static readonly EPUB_A11Y_11_WCAG_21_AAA: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.2 A – https://www.w3.org/TR/epub-a11y-11#wcag-2.2-a
*/
static readonly EPUB_A11Y_11_WCAG_22_A: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.2 AA – https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aa
*/
static readonly EPUB_A11Y_11_WCAG_22_AA: AccessibilityProfile;
/**
* EPUB Accessibility 1.1 WCAG 2.2 AAA – https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aaa
*/
static readonly EPUB_A11Y_11_WCAG_22_AAA: AccessibilityProfile;
/**
* Returns true if the profile is a WCAG Level A profile.
*/
get isWCAGLevelA(): boolean;
/**
* Returns true if the profile is a WCAG Level AA profile.
*/
get isWCAGLevelAA(): boolean;
/**
* Returns true if the profile is a WCAG Level AAA profile.
*/
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);
/**
* Parses a [Certification] from its RWPM JSON representation.
*/
static deserialize(json: any): Certification | undefined;
/**
* Serializes a [Certification] to its RWPM JSON representation.
*/
serialize(): Record<string, any>;
}
export declare class AccessMode {
readonly value: string;
constructor(value: string);
/**
* Parses an [AccessMode] from its RWPM JSON representation.
*/
static deserialize(json: any): AccessMode | undefined;
/**
* Serializes an [AccessMode] to its RWPM JSON representation.
*/
serialize(): any;
/**
* Access mode for auditory content.
*/
static readonly AUDITORY: AccessMode;
/**
* Access mode for chart on visual content.
*/
static readonly CHART_ON_VISUAL: AccessMode;
/**
* Access mode for chemical on visual content.
*/
static readonly CHEM_ON_VISUAL: AccessMode;
/**
* Access mode for color dependent content.
*/
static readonly COLOR_DEPENDENT: AccessMode;
/**
* Access mode for diagram on visual content.
*/
static readonly DIAGRAM_ON_VISUAL: AccessMode;
/**
* Access mode for math on visual content.
*/
static readonly MATH_ON_VISUAL: AccessMode;
/**
* Access mode for music on visual content.
*/
static readonly MUSIC_ON_VISUAL: AccessMode;
/**
* Access mode for tactile content.
*/
static readonly TACTILE: AccessMode;
/**
* Access mode for text on visual content.
*/
static readonly TEXT_ON_VISUAL: AccessMode;
/**
* Access mode for textual content.
*/
static readonly TEXTUAL: AccessMode;
/**
* Access mode for visual content.
*/
static readonly VISUAL: AccessMode;
}
export declare class PrimaryAccessMode {
readonly value: string | string[];
private static readonly VALID_MODES;
constructor(value: string | string[]);
/**
* Parses a [PrimaryAccessMode] from its RWPM JSON representation.
*/
static deserialize(json: any): PrimaryAccessMode | undefined;
/**
* Serializes a [PrimaryAccessMode] to its RWPM JSON representation.
*/
serialize(): string | string[];
/**
* Primary access mode for auditory content.
*/
static readonly AUDITORY: PrimaryAccessMode;
/**
* Primary access mode for tactile content.
*/
static readonly TACTILE: PrimaryAccessMode;
/**
* Primary access mode for textual content.
*/
static readonly TEXTUAL: PrimaryAccessMode;
/**
* Primary access mode for visual content.
*/
static readonly VISUAL: PrimaryAccessMode;
}
export declare class Feature {
readonly value: string;
constructor(value: string);
/**
* Parses a [Feature] from its RWPM JSON representation.
*/
static deserialize(json: any): Feature | undefined;
/**
* Serializes a [Feature] to its RWPM JSON representation.
*/
serialize(): any;
/**
* Feature for no accessibility features.
*/
static readonly NONE: Feature;
/**
* Feature for annotations.
*/
static readonly ANNOTATIONS: Feature;
/**
* Feature for ARIA.
*/
static readonly ARIA: Feature;
/**
* Feature for index.
*/
static readonly INDEX: Feature;
/**
* Feature for page break markers.
*/
static readonly PAGE_BREAK_MARKERS: Feature;
/**
* Feature for page navigation.
*/
static readonly PAGE_NAVIGATION: Feature;
/**
* Feature for print page numbers.
*/
static readonly PRINT_PAGE_NUMBERS: Feature;
/**
* Feature for reading order.
*/
static readonly READING_ORDER: Feature;
/**
* Feature for structural navigation.
*/
static readonly STRUCTURAL_NAVIGATION: Feature;
/**
* Feature for table of contents.
*/
static readonly TABLE_OF_CONTENTS: Feature;
/**
* Feature for tagged PDF.
*/
static readonly TAGGED_PDF: Feature;
/**
* Feature for alternative text.
*/
static readonly ALTERNATIVE_TEXT: Feature;
/**
* Feature for audio description.
*/
static readonly AUDIO_DESCRIPTION: Feature;
/**
* Feature for captions.
*/
static readonly CAPTIONS: Feature;
/**
* Feature for closed captions.
*/
static readonly CLOSED_CAPTIONS: Feature;
/**
* Feature for described math.
*/
static readonly DESCRIBED_MATH: Feature;
/**
* Feature for long description.
*/
static readonly LONG_DESCRIPTION: Feature;
/**
* Feature for open captions.
*/
static readonly OPEN_CAPTIONS: Feature;
/**
* Feature for sign language.
*/
static readonly SIGN_LANGUAGE: Feature;
/**
* Feature for transcript.
*/
static readonly TRANSCRIPT: Feature;
/**
* Feature for display transformability.
*/
static readonly DISPLAY_TRANSFORMABILITY: Feature;
/**
* Feature for synchronized audio text.
*/
static readonly SYNCHRONIZED_AUDIO_TEXT: Feature;
/**
* Feature for timing control.
*/
static readonly TIMING_CONTROL: Feature;
/**
* Feature for unlocked.
*/
static readonly UNLOCKED: Feature;
/**
* Feature for ChemML.
*/
static readonly CHEM_ML: Feature;
/**
* Feature for LaTeX.
*/
static readonly LATEX: Feature;
/**
* Feature for LaTeX chemistry.
*/
static readonly LATEX_CHEMISTRY: Feature;
/**
* Feature for MathML.
*/
static readonly MATH_ML: Feature;
/**
* Feature for MathML chemistry.
*/
static readonly MATH_ML_CHEMISTRY: Feature;
/**
* Feature for TTS markup.
*/
static readonly TTS_MARKUP: Feature;
/**
* Feature for high contrast audio.
*/
static readonly HIGH_CONTRAST_AUDIO: Feature;
/**
* Feature for high contrast display.
*/
static readonly HIGH_CONTRAST_DISPLAY: Feature;
/**
* Feature for large print.
*/
static readonly LARGE_PRINT: Feature;
/**
* Feature for braille.
*/
static readonly BRAILLE: Feature;
/**
* Feature for tactile graphic.
*/
static readonly TACTILE_GRAPHIC: Feature;
/**
* Feature for tactile object.
*/
static readonly TACTILE_OBJECT: Feature;
/**
* Feature for full ruby annotations.
*/
static readonly FULL_RUBY_ANNOTATIONS: Feature;
/**
* Feature for horizontal writing.
*/
static readonly HORIZONTAL_WRITING: Feature;
/**
* Feature for ruby annotations.
*/
static readonly RUBY_ANNOTATIONS: Feature;
/**
* Feature for vertical writing.
*/
static readonly VERTICAL_WRITING: Feature;
/**
* Feature for additional word segmentation.
*/
static readonly WITH_ADDITIONAL_WORD_SEGMENTATION: Feature;
/**
* Feature for lack of additional word segmentation.
*/
static readonly WITHOUT_ADDITIONAL_WORD_SEGMENTATION: Feature;
}
export declare class Hazard {
readonly value: string;
constructor(value: string);
/**
* Parses a [Hazard] from its RWPM JSON representation.
*/
static deserialize(json: any): Hazard | undefined;
/**
* Serializes a [Hazard] to its RWPM JSON representation.
*/
serialize(): any;
/**
* Hazard for flashing.
*/
static readonly FLASHING: Hazard;
/**
* Hazard for no flashing hazard.
*/
static readonly NO_FLASHING_HAZARD: Hazard;
/**
* Hazard for unknown flashing hazard.
*/
static readonly UNKNOWN_FLASHING_HAZARD: Hazard;
/**
* Hazard for motion simulation.
*/
static readonly MOTION_SIMULATION: Hazard;
/**
* Hazard for no motion simulation hazard.
*/
static readonly NO_MOTION_SIMULATION_HAZARD: Hazard;
/**
* Hazard for unknown motion simulation hazard.
*/
static readonly UNKNOWN_MOTION_SIMULATION_HAZARD: Hazard;
/**
* Hazard for sound.
*/
static readonly SOUND: Hazard;
/**
* Hazard for no sound hazard.
*/
static readonly NO_SOUND_HAZARD: Hazard;
/**
* Hazard for unknown sound hazard.
*/
static readonly UNKNOWN_SOUND_HAZARD: Hazard;
/**
* Hazard for unknown hazard.
*/
static readonly UNKNOWN: Hazard;
/**
* Hazard for no hazard.
*/
static readonly NONE: Hazard;
}
export declare class Exemption {
readonly value: string;
constructor(value: string);
/**
* Parses an [Exemption] from its RWPM JSON representation.
*/
static deserialize(json: any): Exemption | undefined;
/**
* Serializes an [Exemption] to its RWPM JSON representation.
*/
serialize(): any;
/**
* None exemption.
*/
static readonly NONE: Exemption;
/**
* Documented exemption.
*/
static readonly DOCUMENTED: Exemption;
/**
* Legal exemption.
*/
static readonly LEGAL: Exemption;
/**
* Temporary exemption.
*/
static readonly TEMPORARY: Exemption;
/**
* Technical exemption.
*/
static readonly TECHNICAL: Exemption;
/**
* EAA disproportionate burden exemption.
*/
static readonly EAA_DISPROPORTIONATE_BURDEN: Exemption;
/**
* EAA fundamental alteration exemption.
*/
static readonly EAA_FUNDAMENTAL_ALTERATION: Exemption;
/**
* EAA microenterprise exemption.
*/
static readonly EAA_MICROENTERPRISE: Exemption;
/**
* EAA technical impossibility exemption.
*/
static readonly EAA_TECHNICAL_IMPOSSIBILITY: Exemption;
/**
* EAA temporary exemption.
*/
static readonly EAA_TEMPORARY: Exemption;
}