Skip to content

Emulator warning banner text is not accessible #4867

Closed
@markgoho

Description

@markgoho

[REQUIRED] Describe your environment

n/a

[REQUIRED] Describe the problem

Steps to reproduce:

Run emulators, see warning banner

Relevant Code:

function attachBanner(): void {
const el = document.createElement('p');
const sty = el.style;
el.innerText =
'Running in emulator mode. Do not use with production credentials.';
sty.position = 'fixed';
sty.width = '100%';
sty.backgroundColor = '#ffffff';
sty.border = '.1em solid #000000';
sty.color = '#ff0000';
sty.bottom = '0px';
sty.left = '0px';
sty.margin = '0px';
sty.zIndex = '10000';
sty.textAlign = 'center';
el.classList.add('firebase-emulator-warning');
document.body.appendChild(el);
}

specifically:

sty.backgroundColor = '#ffffff';
sty.color = '#ff0000';

This color text on that background and at that font size produces a color contrast ratio of 3.99

There's an easy fix: make the color a darker red. PR #4868 fixes this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions