Skip to content

Commit

Permalink
#14 #88 Add contrast enums to release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
azurepolarbear committed Jun 2, 2024
1 parent 07e20d7 commit efa3264
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
44 changes: 44 additions & 0 deletions docs/release-notes/v0.6.0-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,50 @@ declare class RandomSelector<Type> {

# New Enums

## `ContrastFontSize`

```typescript
/**
* Font size category used to evaluate the accessibility standard.
*
* @category Color Contrast
*/
declare enum ContrastFontSize {
/**
* Normal font size.
*/
NORMAL = 'normal',

/**
* Large font size.
*/
LARGE = 'large'
}
```

## `ContrastStandard`

```typescript
/**
* Web Content Accessibility Guidelines (WCAG) color contrast categories.<br/>
* To learn more about WCAG, visit
* <a href="https://www.w3.org/WAI/standards-guidelines/wcag/" target="_blank" rel="noopener noreferrer">https://www.w3.org/WAI/standards-guidelines/wcag/</a>.
*
* @category Color Contrast
*/
declare enum ContrastStandard {
/**
* WCAG AA Standard (color contrast >= 4.5)
*/
AA = 'AA',

/**
* WCAG AAA Standard (color contrast >= 7)
*/
AAA = 'AAA'
}
```

## `Discriminators`

```typescript
Expand Down
2 changes: 0 additions & 2 deletions src/main/color/color-contrast/color-contrast-assessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {Color} from 'color';
import {Discriminator} from 'discriminator';
import {PaletteColor} from 'palette';

// TODO - add to release notes
/**
* Web Content Accessibility Guidelines (WCAG) color contrast categories.<br/>
* To learn more about WCAG, visit
Expand All @@ -41,7 +40,6 @@ export enum ContrastStandard {
AAA = 'AAA'
}

// TODO - add to release notes
/**
* Font size category used to evaluate the accessibility standard.
*
Expand Down

0 comments on commit efa3264

Please sign in to comment.