Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checklist, Radio Button W3C Complaince #468

Closed
jkosoy opened this issue Jun 20, 2018 · 0 comments · Fixed by #559
Closed

Checklist, Radio Button W3C Complaince #468

jkosoy opened this issue Jun 20, 2018 · 0 comments · Fixed by #559

Comments

@jkosoy
Copy link

jkosoy commented Jun 20, 2018

Given a schema like this:

{
  type: 'radios',
  inputName: 'test_radio_buttons',
  label: 'Test Radio Buttons',
  values: ['Radio 1', 'Radio 2']
}

I've noticed that the output for radios and checklists look like something akin to this:

<div class="form-group valid field-radios">
  <label for="test-radio-buttons">Test Radio Buttons<!----></label>
  <div class="field-wrap">
    <div class="radio-list">
      <label class="is-checked">
        <input id="test-radio-buttons" type="radio" name="test_radio_buttons" value="Radio 1" checked="checked">Radio 1
      </label>
      
      <label>
        <input id="test-radio-buttons" type="radio" name="test_radio_buttons" value="Radio 2">Radio 2
      </label>
    </div>
  </div>
</div>

Note the id on both inputs is the same. This issue also occurs on Checklists. The ID fields on on a a given page should be unique. Is it possible to add _[idx] to the ID on each of these to make sure the IDs line up?

zoul0813 added a commit to zoul0813/vue-form-generator that referenced this issue Dec 10, 2018
zoul0813 added a commit to zoul0813/vue-form-generator that referenced this issue Dec 14, 2018
* samples/fsfiddle-demo:
  jsfiddle-sample embedded into repo
  migrated VFG docs to newer GitBooks, created GitHub Repo for Docs to allow for easier maintenance, updated JSFiddle to use "latest" VFG, and created a CodePen version as well
  Codacy (guard-for-in) fix
  fixed code structure
  added "options" to VFG install function, appending custom "validators" to the validators object that are passed into `Vue.use(VueFormGenerator, { validators: { key: (value, field, model) => {} })
  added an optional "unique" flag to "getFieldID" that appends lodash "uniqueId" to the ID when true.  Fixes vue-generators#468
  fixed single-quotes
  added "type" attribute to inside buttons schema, defaults to "button" when one is not provided
  fixes vue-generators#480 - dates are always passed to "date" and "datetime-local" elements using the standard format (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss), and "datetime" elements are converted into "datetime-local" (datetime is deprecated/obsolete).
  added "item.disabled" logic, supporting both boolean values and a function that is passed a reference to the model to determine disabled logic based on the model.
  listen for model-updated from `fields`, and fix `debounceFormatFunction` property to match fieldInput's `debounceFormatFunc` instead.
  Fix required number input does not require a value
zoul0813 added a commit to zoul0813/vue-form-generator that referenced this issue Dec 14, 2018
* master-origin:
  fix issue with null values on datetime
  2.3.3 releases
  added newline
  migrated VFG docs to newer GitBooks, created GitHub Repo for Docs to allow for easier maintenance, updated JSFiddle to use "latest" VFG, and created a CodePen version as well
  code fix
  fixes an issue with fieldPikaday modifying the field schema and attaching `this.$el` to it, the pikadayOptions are now stored as `this.options` and created with `defaults({}, this.schema.pikadayOptions, {...})` to prevent this
  Codacy (guard-for-in) fix
  fixed code structure
  added "options" to VFG install function, appending custom "validators" to the validators object that are passed into `Vue.use(VueFormGenerator, { validators: { key: (value, field, model) => {} })
  added an optional "unique" flag to "getFieldID" that appends lodash "uniqueId" to the ID when true.  Fixes vue-generators#468
  fixed single-quotes
  added "type" attribute to inside buttons schema, defaults to "button" when one is not provided
  fixes vue-generators#480 - dates are always passed to "date" and "datetime-local" elements using the standard format (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss), and "datetime" elements are converted into "datetime-local" (datetime is deprecated/obsolete).
  added "item.disabled" logic, supporting both boolean values and a function that is passed a reference to the model to determine disabled logic based on the model.
  listen for model-updated from `fields`, and fix `debounceFormatFunction` property to match fieldInput's `debounceFormatFunc` instead.
  Fix required number input does not require a value
  feat: add maxElements slot to fieldVueMultiSelect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants