The direction of the form field is initially set to 'auto'. Click on the button to see whether dirname assigns the computed direction of the form field to the 'comment-direction' parameter (which is sent to the server). You can also try changing the direction manually.

Code

<form action="dirname_test.html" method="get">
<p><label>Comment: <input type="text" dir="" name="comment" dirname="comment-direction" required value="مرحبا !" ></label></p>
<p><button name="mode" type="submit" value="add">Post Comment</button></p>
</form>