episphere / quest

experimenting with the idea of a questionnaire markup
https://episphere.github.io/quest/
2 stars 11 forks source link

Problem with "Other" #443

Open danielruss opened 5 months ago

danielruss commented 5 months ago

When the code was changed for in-survey accessibility enhancements (#436) The code to hand the "others" was changed.

originally:

 [...divElement.querySelectorAll("label input,label textarea")].forEach(inputElement => {
      let radioCB = document.getElementById(inputElement.closest('label').htmlFor) 

RadioCB is the input[type="radio"] or input[type="checkbox"] associated with the other input box.

This was changed to

let radioCB = document.getElementById(inputElement.id) which is the type box.

This is why the results are screwing up when the "other" is selected.

https://github.com/episphere/quest/blob/ec22434a7a942dcabc92e02abc66d550eec27f6a/replace2.js#L1036-L1037

anthonypetersen commented 5 months ago

@danielruss - thanks for highlighting that change! switching the one line back appears to resolve everything, Joe has an additional test he is going to run for VoiceOver

anthonypetersen commented 5 months ago

related to https://github.com/episphere/questionnaire/issues/370

JoeArmani commented 5 months ago

This bug was addressed in https://github.com/episphere/quest/pull/444, and the revert/fix is included in release v1.1.7.