带 <legend> 的 <fieldset>,用来给控件分组。
<fieldset style="width: 260px">
<legend>Sound</legend>
<div class="field-row"><label><input type="checkbox" checked> Play system alerts</label></div>
</fieldset>Mac OS 四个年代并排对照
- 选择器
fieldsetlegend- Token
--clio-group-border--clio-group-shadow- 无障碍
- fieldset 的 legend 会把这一组的名称告诉屏幕阅读器。
证据(8)
| 年代 | 数值 | 状态 | 来源 |
|---|---|---|---|
| System 7 | Native group box: a 1px grey line with the legend on it; the original alternates #777 and #888, drawn #777 here | 实测 | clio.css capture, System 7.5.3 in Infinite Mac (npm run capture:system7), frames general-controls and numbersSystem 7.5.3 control panels |
| System 6 | System 6 had no group box; clio.css draws a 1px ink frame with the legend on paper | 调整 | clio.cssControl Panel divides its panes with plain 1px rules (clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame control-panel) |
| Platinum | Etched: #888 line with a white line inside and below | 实测 | apps/desktop/styles/65-appearance-themes.css:909 (P20)Mac OS 9 native group box |
| Drawing Board | Group boxes: a 1px #777 line (#888 on the bottom and right edge), no bevel | 实测 | clio.css capture, Mac OS 8.5 with the 8.5b6 Drawing Board theme in Infinite Mac (npm run capture:drawingboard), frame general-controlsDesktop group |
| Platinum | Secondary group box (fieldset.secondary): one #888 line, no light | 实测 | clio.css capture, Mac OS 9.0 in Infinite Mac (frames in .fidelity/hig/platinum9), frame sound (Settings for selected device)— |
| Classic eras | A check box or pop-up menu can title a group box from inside the legend | 实测 | clio.css capture, Mac OS 9.0 in Infinite Mac (frames in .fidelity/platinum9), frame date-time (Use a Network Time Server)— |
| NeXTSTEP | Box: a #555555 outline with a white one drawn over it a pixel down and right | 实测 | clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame prefsapp-moved (Preferences, Mouse), the Menu Button box)fidelity nx-box-corner |
| NeXTSTEP | The box's title centred across its top line, the lines broken round it | 推断 | clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame prefsapp-moved (Preferences, Mouse))the title is Helvetica and is not compared |