forked from Business/BinStack
		
	Strip tags from aria-label
This commit is contained in:
		
							parent
							
								
									69c634ea99
								
							
						
					
					
						commit
						892102528b
					
				| @ -181,6 +181,7 @@ HTMLTOP; | |||||||
|             if ($item['type'] != "checkbox") { |             if ($item['type'] != "checkbox") { | ||||||
|                 $itemlabel = "<label class=\"mb-0\">$item[label]:</label>"; |                 $itemlabel = "<label class=\"mb-0\">$item[label]:</label>"; | ||||||
|             } |             } | ||||||
|  |             $strippedlabel = strip_tags($item['label']); | ||||||
|             $itemhtml .= <<<ITEMTOP |             $itemhtml .= <<<ITEMTOP | ||||||
| \n\n                <div class="col-12 col-md-$item[width]"> | \n\n                <div class="col-12 col-md-$item[width]"> | ||||||
|                     <div class="form-group mb-3"> |                     <div class="form-group mb-3"> | ||||||
| @ -193,7 +194,7 @@ ITEMTOP; | |||||||
|             switch ($item['type']) { |             switch ($item['type']) { | ||||||
|                 case "select": |                 case "select": | ||||||
|                     $itemhtml .= <<<SELECT |                     $itemhtml .= <<<SELECT | ||||||
| \n                            <select class="form-control" name="$item[name]" aria-label="$item[label]" $required> | \n                            <select class="form-control" name="$item[name]" aria-label="$strippedlabel" $required> | ||||||
| SELECT; | SELECT; | ||||||
|                     foreach ($item['options'] as $value => $label) { |                     foreach ($item['options'] as $value => $label) { | ||||||
|                         $selected = ""; |                         $selected = ""; | ||||||
| @ -207,14 +208,14 @@ SELECT; | |||||||
|                 case "checkbox": |                 case "checkbox": | ||||||
|                     $itemhtml .= <<<CHECKBOX |                     $itemhtml .= <<<CHECKBOX | ||||||
| \n                            <div class="form-group form-check"> | \n                            <div class="form-group form-check"> | ||||||
|                                 <input type="checkbox" name="$item[name]" $id class="form-check-input" value="$item[value]" $required aria-label="$item[label]"> |                                 <input type="checkbox" name="$item[name]" $id class="form-check-input" value="$item[value]" $required aria-label="$strippedlabel"> | ||||||
|                                 <label class="form-check-label">$item[label]</label> |                                 <label class="form-check-label">$item[label]</label> | ||||||
|                               </div> |                               </div> | ||||||
| CHECKBOX; | CHECKBOX; | ||||||
|                     break; |                     break; | ||||||
|                 default: |                 default: | ||||||
|                     $itemhtml .= <<<INPUT |                     $itemhtml .= <<<INPUT | ||||||
| \n                            <input type="$item[type]" name="$item[name]" $id class="form-control" aria-label="$item[label]" minlength="$item[minlength]" maxlength="$item[maxlength]" $pattern value="$item[value]" $required /> | \n                            <input type="$item[type]" name="$item[name]" $id class="form-control" aria-label="$strippedlabel" minlength="$item[minlength]" maxlength="$item[maxlength]" $pattern value="$item[value]" $required /> | ||||||
| INPUT; | INPUT; | ||||||
|                     break; |                     break; | ||||||
|             } |             } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user