@@ -171,7 +171,7 @@ details.
171
171
See [ the W3C's WAI-ARIA] ( https://www.w3.org/WAI/PF/aria-1.1/states_and_properties#aria-live )
172
172
for more information on aria-live regions.
173
173
174
- ` LiveAnnouncer ` 用于通过 ` aria-live ` 区域为屏幕阅读器用户播报信息。关于 ` aria-live ` 区域的详细信息,请参见 [ W3C 的 WAI-ARIA] ( https://www.w3.org/TR/wai-aria/states_and_properties#aria-live ) 。
174
+ ` LiveAnnouncer ` 用于通过 ` aria-live ` 区域为屏幕阅读器用户播报信息。关于 ` aria-live ` 区域的详细信息,请参见 [ W3C 的 WAI-ARIA] ( https://www.w3.org/TR/wai-aria/states_and_properties#aria-live ) 。
175
175
176
176
#### Example
177
177
@@ -204,7 +204,7 @@ monitor and an optional boolean flag `checkChildren`. Passing true for `checkChi
204
204
defaults to ` false ` if not specified. The ` monitor ` method will return an Observable that emits the
205
205
` FocusOrigin ` whenever the focus state changes. The ` FocusOrigin ` will be one of the following:
206
206
207
- 要监听某个元素的焦点变化,可以用 ` monitor ` 方法传入要监控的元素和一个可选的逻辑标志 ` checkChildren ` 。给 ` checkChildren ` 传入 ` true ` 会告诉 ` FocusMonitor ` :如果该元素的任何各级子元素有焦点,就认为该元素有焦点。如果没有指定,该选项默认为 ` false ` 。` monitor ` 方法会返回一个可观察对象,当焦点状态改变时,该对象会发送一个 ` FocusOrigin ` 。 ` FocusOrigin ` 是下列值之一:
207
+ 要监听某个元素的焦点变化,可以用 ` monitor ` 方法传入要监控的元素和一个可选的逻辑标志 ` checkChildren ` 。给 ` checkChildren ` 传入 ` true ` 会告诉 ` FocusMonitor ` :如果该元素的任何各级子元素有焦点,就认为该元素有焦点。如果没有指定,该选项默认为 ` false ` 。` monitor ` 方法会返回一个可观察对象,当焦点状态改变时,该对象会发送一个 ` FocusOrigin ` 。` FocusOrigin ` 是下列值之一:
208
208
209
209
* ` 'mouse' ` indicates the element was focused with the mouse
210
210
@@ -269,7 +269,7 @@ For convenience, the CDK also provides two directives that allow for easily moni
269
269
the host element with ` checkChildren ` set to ` true ` . Each of these directives has an ` @Output() `
270
270
` cdkFocusChange ` that will emit the new ` FocusOrigin ` whenever it changes.
271
271
272
- 为了方便使用,CDK 还提供了两个指令,可以简单地监控某个元素。` cdkMonitorElementFocus ` 相当于在 ` checkChildren ` 为 ` false ` 的宿主元素上调用 ` monitor ` 。 ` cdkMonitorSubtreeFocus ` 相当于在 ` checkChildren ` 为 ` true ` 的宿主元素上调用 ` monitor ` 。这两个指令都有一个 ` @Output() ` ` cdkFocusChange ` ,每当它发生变化时都会通过该事件发出新的 ` FocusOrigin ` 。
272
+ 为了方便使用,CDK 还提供了两个指令,可以简单地监控某个元素。` cdkMonitorElementFocus ` 相当于在 ` checkChildren ` 为 ` false ` 的宿主元素上调用 ` monitor ` 。` cdkMonitorSubtreeFocus ` 相当于在 ` checkChildren ` 为 ` true ` 的宿主元素上调用 ` monitor ` 。这两个指令都有一个 ` @Output() ` ` cdkFocusChange ` ,每当它发生变化时都会通过该事件发出新的 ` FocusOrigin ` 。
273
273
274
274
<!-- example(focus-monitor-directives) -->
275
275
@@ -344,7 +344,7 @@ targets. The accepted values are `active` (default), `black-on-white`, and `whit
344
344
values correspond to the supported values for the
345
345
[ ` -ms-high-contrast ` media query] [ ms-high-contrast ] .
346
346
347
- ` $target ` 参数允许你指定这些样式要用高对比度模式的哪个变体。接受的值是 ` active ` (默认),` black-on-white ` 和 ` white-on-black ` 。这些值对应于 [ ` -ms-high-contrast ` 媒体查询] [ ms-high-contrast ] 所支持的值。
347
+ ` $target ` 参数允许你指定这些样式要用高对比度模式的哪个变体。接受的值是 ` active ` (默认),` black-on-white ` 和 ` white-on-black ` 。这些值对应于 [ ` -ms-high-contrast ` 媒体查询] [ ms-high-contrast ] 所支持的值。
348
348
349
349
The ` $encapsulation ` parameter affects how the emitted styles interact with style encapsulation.
350
350
The supported values are ` on ` , ` off ` , and ` any ` . The default value is ` any ` , which works for any
@@ -353,7 +353,7 @@ the amount of CSS emitted by limiting the styles to components with encapsulatio
353
353
disabled, respectively. The styles emitted for encapsulated components work for both Angular's
354
354
emulated style encapsulation and for native Shadow DOM encapsulation.
355
355
356
- ` $encapsulation ` 参数会影响所生成的样式与样式封装的互动。支持的值是 ` on ` 、` off ` 和 ` any ` 。默认值为 ` any ` ,它生成的两个选择器,可用于任何封装方案。指定为 ` on ` 或 ` off ` ,可以将样式分别限制为启用或禁用样式封装,可以轻微减小生成的 CSS 的大小。这些为带封装的组件生成的样式,会作用于 Angular 的模拟(emulated)样式封装和原生(native) Shadow DOM 封装方式。
356
+ ` $encapsulation ` 参数会影响所生成的样式与样式封装的互动。支持的值是 ` on ` 、` off ` 和 ` any ` 。默认值为 ` any ` ,它生成的两个选择器,可用于任何封装方案。指定为 ` on ` 或 ` off ` ,可以将样式分别限制为启用或禁用样式封装,可以轻微减小生成的 CSS 的大小。这些为带封装的组件生成的样式,会作用于 Angular 的模拟(emulated)样式封装和原生(native) Shadow DOM 封装方式。
357
357
358
358
[ Windows 高对比度模式 ] : https://support.microsoft.com/en-us/windows/use-high-contrast-mode-in-windows-10-fedc744c-90ac-69df-aed5-c8a90125e696
359
359
0 commit comments