Closed ahuth closed 7 years ago
First of all, thank you for the really cool project! Unfortunately, I seem to have broken it. And not just for myself, but the site seems to be down now.
I was experimenting with accessible autocompleters in React. After entering the following component, there's now a 500 error when visiting the site:
import React, {Component} from "react" class Autocompleter extends Component { constructor(props) { super(props) this.state = {focused: false} } render() { return ( <label> {this.props.label} <div class="suggestions-help" role="status" aria-live="polite"></div> <input type="text" autocomplete="off" aria-autocomplete="list" /> <div class="suggestions"> {this.state.focused && <ul role="listbox"> {this.props.items.map((item, index) => { <li role="option" key={index}>{item}</li> })} </ul> } </div> </label> ) } }
When it broke, I was working on the loop creating the individual list items:
<div class="suggestions"> {this.state.focused && <ul role="listbox"> {this.props.items.map((item, index) => { <li role="option" key={index}>{item}</li> })} </ul> } </div>
First of all, thank you for the really cool project! Unfortunately, I seem to have broken it. And not just for myself, but the site seems to be down now.
I was experimenting with accessible autocompleters in React. After entering the following component, there's now a 500 error when visiting the site:
When it broke, I was working on the loop creating the individual list items: