Skip to content

Commit 2b34867

Browse files
Update article.md
1 parent 1b3128d commit 2b34867

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,20 @@
111111
به صورت پیش‌فرض، بیشتر عناصر از focus پشتیبانی نمی‌کنند.
112112

113113
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`
114115

115-
On the other hand, elements that exist to format something, such as `<div>`, `<span>`, `<table>` -- are unfocusable by default. The method `elem.focus()` doesn't work on them, and `focus/blur` events are never triggered.
116+
از طرفی دیگر، عناصری که برای format کردن چیزی وجود دارند،‌ مثل `<div>`، `<span>`، `<table>` -- به طور پیش‌فرض غیر قابل focus هستند. متد `elem.focus()` روی آن‌ها کار نمی‌کند و eventهای `focus/blur` هیچ وقت trigger نمی‌شوند.
116117

117-
This can be changed using HTML-attribute `tabindex`.
118+
می‌توانیم این را با `tabindex` که یک HTML-attribute است تغییر دهیم.
118119

119-
Any element becomes focusable if it has `tabindex`. The value of the attribute is the order number of the element when `key:Tab` (or something like that) is used to switch between them.
120+
هر elementای اگر `tabindex` داشته باشد، قابل focus می‌شود. هنگامی که `key:Tab` (یا چیزی شبیه آن) برای جابه‌جایی بین آن‌ها استفاده می‌شود،‌ مقدار attribute برابر order number آن element می‌شود.
120121

121-
That is: if we have two elements, the first has `tabindex="1"`, and the second has `tabindex="2"`, then pressing `key:Tab` while in the first element -- moves the focus into the second one.
122122

123-
The switch order is: elements with `tabindex` from `1` and above go first (in the `tabindex` order), and then elements without `tabindex` (e.g. a regular `<input>`).
123+
یعنی: اگر ما دو element داشته باشیم که اولی `tabindex="1"` داشته باشد و دومی `tabindex="2"` داشته باشد، آنگاه وقتی در اولین element هستیم و `key:Tab` را فشار می‌دهیم -- focus را به دومی می‌برد.
124124

125-
Elements without matching `tabindex` are switched in the document source order (the default order).
125+
ترتیب تغییر به این صورت است: elementهایی با `tabindex` از `1` و بالاتر ابتدا می‌روند (در ترتیب `tabindex`) و بعد از آن، elementهای بدون `tabindex` (مثلا یک `<input>` معمولی)
126+
127+
عناصری که با `tabindex` تطبیق پیدا نمی‌کنند، به ترتیب document source (به ترتیب پیش‌فرض) تغییر می‌کنند.
126128

127129
There are two special values:
128130

0 commit comments

Comments
 (0)