You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest change anchor tag to button tag in footer's todo item filter list.
There are 2 reasons for this suggestion.
Anchor tag <a> is meant for routing/redirecting to other pages. In the other hand, button tag <button> is meant for all actions that is not routing/redirecting. This is recommended for sematic web. Since todo item filter is meant for filtering todo items and not routing, components for filter should be button instead for anchor.
Anchor tag can cause unexpected routing in some conditions. For example, anchor tags as button in iframe will redirect to iframe's parent page. In https://yorkie.dev/examples/todomvc example, when you click filtering options (All, Active, Completed), you will be redirected to iframe's parent url, which is https://yorkie.dev/#. Below is demo for demonstrating this problem.
For this two reasons, I suggest change anchor tag to button tag in footer's todo item filter list.
Code for React/Typescript will look like:
I suggest change anchor tag to button tag in footer's todo item filter list.
There are 2 reasons for this suggestion.
<a>
is meant for routing/redirecting to other pages. In the other hand, button tag<button>
is meant for all actions that is not routing/redirecting. This is recommended for sematic web. Since todo item filter is meant for filtering todo items and not routing, components for filter should be button instead for anchor.For this two reasons, I suggest change anchor tag to button tag in footer's todo item filter list.
Code for React/Typescript will look like:
To keep appearance same as before, this CSS should be applied.
The text was updated successfully, but these errors were encountered: