MicrosoftEdge / MicrosoftEdge/MSEdgeExplainers

[Contextual Logging With Console Context] UI Accessibility

Open
#1,010 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Contextual Logging With Console Context
Dominant language
HTML
Stars
1.4k
Forks
286
Avg merge
3d 1h
Merged PRs (30d)
8

Description

First off, I love the proposed enhancements here.

In terms of the concerns over proper color contrast for accessibility of the badges when using dev-defined colors, you should be able to analyze the color and determine whether it’s better to go with white or black text against the color background for maximum contrast. You could even take it a step further and tune the design to mimic how GitHub handles labels (using some clever color calculations):

.btUVdh {
  text-decoration-color: currentcolor;

  --label-r: 83;
  --label-g: 25;
  --label-b: 231;
  --label-h: 257;
  --label-s: 81;
  --label-l: 50;
  --perceived-lightness: calc(((var(--label-r) * 0.2126) + (var(--label-g) * 0.7152) + (var(--label-b) * 0.0722)) / 255);
  --lightness-switch: max(0,min(calc((var(--perceived-lightness) - var(--lightness-threshold)) * -1000),1));
  --border-color: var( --borderColor-muted, var(--color-border-subtle) );
  --lightness-threshold: 0.6;
  --background-alpha: 0.18;
  --border-alpha: 0.3;
  --lighten-by: calc( ((var(--lightness-threshold) - var(--perceived-lightness)) * 100) * var(--lightness-switch) );

  background: rgba( var(--label-r), var(--label-g),var(--label-b), var(--background-alpha) );
  color: hsl( var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) + var(--lighten-by)) * 1%) );
  border-color: hsla( var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) + var(--lighten-by)) * 1%), var(--border-alpha) );
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by locating the contextual logging UI and reviewing the supplied CSS color calculations; compare the current badge styling with the accessibility concern described here. Done means dev-defined badge colors use an accessible text treatment and the resulting design behavior is documented or covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
accessibility, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.