3
當您在表單中的標籤上明確設置position:relative時,VoiceOver不會大聲讀出標籤文本。我只使用Chrome和VoiceOver進行過測試,所以我不知道是否會出現其他屏幕閱讀器/瀏覽器組合。可能只是一個奇怪的錯誤,因爲屏幕閱讀器會關心定位風格的原因並不明顯。爲什麼標籤上的相對定位使標籤內容對VoiceOver屏幕閱讀器不可見?
<form>
<fieldset>
<legend>Label Position Quirk</legend>
<input id="thing1" type="checkbox">
<label for="thing1" style="position:relative">This won't be read</label>
<input id="thing2" type="checkbox">
<label for="thing2">This will be read</label>
</fieldset>
</form>
哦瀏覽器,你永遠不會停止驚奇。 – BoltClock