边缘浏览器:高对比度可访问性:文本背景与div背景不同

时间:2017-02-07 02:08:53

标签: css accessibility high-contrast

我正致力于高对比度的辅助功能。我在这里遇到一个奇怪的问题。在正常模式下,文本采用与父级背景颜色相同的背景颜色(例如DIV),但在高对比度模式下,文本背景虽然父级的背景颜色不同,但仍为黑色。

这是JSFIDDLE

CSS

.test {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 14px;
    color: #000000;
    background-color: #dddddd;
    height: 50px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-align: center;
    align-items: center;
    cursor: pointer;
}

@media screen and (-ms-high-contrast:active) {
    .test{
        background-color: #1BEAFE;
    } 
}

HTML

<div class="test">
    <div class="test2">
    hi there alok
    </div>
</div>

高对比度的快捷键:Shift + Alt + PrtScrn

问题: enter image description here

预期结果:

enter image description here

注意:这在IE中运行良好。这是Edge浏览器(Microsoft EdgeHTML 14.14393和Microsoft Edge 38.14393.0.0)的唯一问题

0 个答案:

没有答案