Skip to content

Commit 747efb0

Browse files
Update article.md
1 parent a074ed2 commit 747efb0

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

2-ui/4-forms-controls/2-focus-blur/article.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@
110110

111111
به صورت پیش‌فرض، بیشتر عناصر از focus پشتیبانی نمی‌کنند.
112112

113-
The list varies a bit between browsers, but one thing is always correct: `focus/blur` support is guaranteed for elements that a visitor can interact with: `<button>`, `<input>`, `<select>`, `<a>` and so on.
114-
این لیست کمی میان مرورگرها تفاوت می‌کند اما یک چیز همیشه درست است: `focus/blur`
113+
این لیست کمی میان مرورگرها تفاوت می‌کند اما یک چیز همیشه درست است: پشتیبانی از `focus/blur` برای elementهایی که یک کاربر می‌تواند با آن‌ها تعامل داشته باشد:‌ `<button>`, `<input>`, `<select>`, `<a>` و ... تضمین شده است.
115114

116115
از طرفی دیگر، عناصری که برای format کردن چیزی وجود دارند،‌ مثل `<div>`، `<span>`، `<table>` -- به طور پیش‌فرض غیر قابل focus هستند. متد `elem.focus()` روی آن‌ها کار نمی‌کند و eventهای `focus/blur` هیچ وقت trigger نمی‌شوند.
117116

@@ -137,12 +136,12 @@ The list varies a bit between browsers, but one thing is always correct: `focus/
137136
برای مثال، اینجا یک لیست داریم. روی اولین item کلیک کنید و `key:Tab` را فشار دهید.
138137

139138
```html autorun no-beautify
140-
Click the first item and press Tab. Keep track of the order. Please note that many subsequent Tabs can move the focus out of the iframe in the example.
139+
روی اولین item کلیک کنید و Tab را فشار دهید. order را پیگری کنید. لطفا توجه داشته باشد که تعداد زیادی Tab بعدی می‌تواند focus را از iframe داخل مثال خارج کند.
141140
<ul>
142-
<li tabindex="1">One</li>
143-
<li tabindex="0">Zero</li>
144-
<li tabindex="2">Two</li>
145-
<li tabindex="-1">Minus one</li>
141+
<li tabindex="1">یک</li>
142+
<li tabindex="0">صفر</li>
143+
<li tabindex="2">دو</li>
144+
<li tabindex="-1">منهای یک</li>
146145
</ul>
147146

148147
<style>
@@ -151,7 +150,7 @@ Click the first item and press Tab. Keep track of the order. Please note that ma
151150
</style>
152151
```
153152

154-
The order is like this: `1 - 2 - 0`. Normally, `<li>` does not support focusing, but `tabindex` full enables it, along with events and styling with `:focus`.
153+
ترتیب به این صورت است: `1 - 2 - 0`. به طور نرمال، `<li>` از focus پشتیبانی نمی‌کند اما `tabindex` آن را به همراه eventها و style دادن با `:focus` مهیا می‌کند.
155154

156155
```smart header="The property `elem.tabIndex` works too"
157156
We can add `tabindex` from JavaScript by using the `elem.tabIndex` property. That has the same effect.

0 commit comments

Comments
 (0)