Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,15 @@ export class ThemeGeneratorPage extends BaseComponent<{}, IThemeGeneratorPageSta
<td>Slot pair</td>
</thead>
<tbody>
{ [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)] }
</tbody>
</table>

</div>
);
}
Expand Down Expand Up @@ -300,7 +306,7 @@ export class ThemeGeneratorPage extends BaseComponent<{}, IThemeGeneratorPageSta

return (
<tr key={ String(foreground) + String(background) }>
<td style={ { backgroundColor: bgc.str, color: fgc.str } }>The quick brown fox jumps over the lazy dog.</td>
<td style={ { backgroundColor: bgc.str, color: fgc.str } }>How vexingly quick daft zebras jump.</td>
<td>{ contrastRatioString }</td>
<td>{ FabricSlots[foreground] + ' + ' + FabricSlots[background] }</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down