File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
# ChangeLog for yesod-form
2
2
3
+ ## 1.6.5
4
+
5
+ * Add ` .sr-only ` to labels in ` renderBootstrap3 ` when they are null.
6
+
3
7
## 1.6.4
4
8
5
9
* Make FormResult an instance of Eq
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import Control.Arrow (second)
32
32
import Control.Monad (liftM )
33
33
import Data.Text (Text )
34
34
import Data.String (IsString (.. ))
35
+ import qualified Text.Blaze.Internal as Blaze
35
36
import Yesod.Core
36
37
import Yesod.Form.Types
37
38
import Yesod.Form.Functions
@@ -154,7 +155,7 @@ renderBootstrap3 formLayout aform fragment = do
154
155
$case formLayout
155
156
$of BootstrapBasicForm
156
157
$if fvId view /= bootstrapSubmitId
157
- <label for=#{fvId view}>#{fvLabel view}
158
+ <label :Blaze.null (fvLabel view):.sr-only for=#{fvId view}>#{fvLabel view}
158
159
^{fvInput view}
159
160
^{helpWidget view}
160
161
$of BootstrapInlineForm
@@ -164,7 +165,7 @@ renderBootstrap3 formLayout aform fragment = do
164
165
^{helpWidget view}
165
166
$of BootstrapHorizontalForm labelOffset labelSize inputOffset inputSize
166
167
$if fvId view /= bootstrapSubmitId
167
- <label .control-label .#{toOffset labelOffset} .#{toColumn labelSize} for=#{fvId view}>#{fvLabel view}
168
+ <label :Blaze.null (fvLabel view):.sr-only .control-label .#{toOffset labelOffset} .#{toColumn labelSize} for=#{fvId view}>#{fvLabel view}
168
169
<div .#{toOffset inputOffset} .#{toColumn inputSize}>
169
170
^{fvInput view}
170
171
^{helpWidget view}
Original file line number Diff line number Diff line change 1
1
name : yesod-form
2
- version : 1.6.4
2
+ version : 1.6.5
3
3
license : MIT
4
4
license-file : LICENSE
5
5
author : Michael Snoyman <
[email protected] >
You can’t perform that action at this time.
0 commit comments