diff --git a/common/changes/office-ui-fabric-react/phkuo-themeAccessibility_2018-05-30-22-31.json b/common/changes/office-ui-fabric-react/phkuo-themeAccessibility_2018-05-30-22-31.json new file mode 100644 index 00000000000000..98ee62999d962b --- /dev/null +++ b/common/changes/office-ui-fabric-react/phkuo-themeAccessibility_2018-05-30-22-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Theming: generate a more accessible themeLighter and more accessibility pairs", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "phkuo@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/ThemeGenerator/ThemeGeneratorPage.tsx b/packages/office-ui-fabric-react/src/components/ThemeGenerator/ThemeGeneratorPage.tsx index 1f59502bf88b2f..7cc9a64ec86e11 100644 --- a/packages/office-ui-fabric-react/src/components/ThemeGenerator/ThemeGeneratorPage.tsx +++ b/packages/office-ui-fabric-react/src/components/ThemeGenerator/ThemeGeneratorPage.tsx @@ -222,9 +222,15 @@ export class ThemeGeneratorPage extends BaseComponent<{}, IThemeGeneratorPageSta Slot pair - { [this._accessibilityRow(FabricSlots.neutralPrimary, FabricSlots.white)] } + { [this._accessibilityRow(FabricSlots.neutralPrimary, FabricSlots.white), + this._accessibilityRow(FabricSlots.white, FabricSlots.themePrimary), + this._accessibilityRow(FabricSlots.neutralPrimary, FabricSlots.themeLighter), + this._accessibilityRow(FabricSlots.themeDarkAlt, FabricSlots.themeLighter), + this._accessibilityRow(FabricSlots.neutralPrimary, FabricSlots.neutralLighter), + this._accessibilityRow(FabricSlots.themeDark, FabricSlots.neutralLighter)] } + ); } @@ -300,7 +306,7 @@ export class ThemeGeneratorPage extends BaseComponent<{}, IThemeGeneratorPageSta return ( - The quick brown fox jumps over the lazy dog. + How vexingly quick daft zebras jump. { contrastRatioString } { FabricSlots[foreground] + ' + ' + FabricSlots[background] } diff --git a/packages/office-ui-fabric-react/src/utilities/color/shades.ts b/packages/office-ui-fabric-react/src/utilities/color/shades.ts index 92e5b0cecf95d9..117eb29a5483c7 100644 --- a/packages/office-ui-fabric-react/src/utilities/color/shades.ts +++ b/packages/office-ui-fabric-react/src/utilities/color/shades.ts @@ -20,7 +20,7 @@ const WhiteShadeTable = [.537, .349, .216, .184, .145, .082, .043, .027]; // whi const BlackTintTable = [.537, .45, .349, .216, .184, .145, .082, .043]; // black fg const LumTintTable = [.88, .77, .66, .55, .44, .33, .22, .11]; // light (strongen all) const LumShadeTable = [.11, .22, .33, .44, .55, .66, .77, .88]; // dark (soften all) -const ColorTintTable = [.960, .840, .700, .400, .120]; // default soften +const ColorTintTable = [.960, .890, .700, .400, .120]; // default soften const ColorShadeTable = [.100, .240, .440]; // default strongen // If the given shade's luminance is below/above these values, we'll swap to using the White/Black tables above