Coder Social home page Coder Social logo

text-input's People

Contributors

awikkerink avatar dbatiste avatar dlockhart avatar ianmclean2011 avatar mdgbayly avatar mdulat avatar svanherk avatar wongvincent avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

text-input's Issues

Default the "type" to "button"

Button elements have a default type value of "submit", which will automatically submit a parent form when the user hits enter. This is typically not desired behaviour.

To prevent this, lets default the "type" attribute to "button".

This will be a breaking change, so will require a major version bump.

Find some way to label the component

Both aria-labelledby and aria-describedby won't work with web components and shadow DOM, because the IDs of those elements are out of scope.

2 potential solutions:

  1. Wrap the custom element in a label:
<d2l-label text="label for input">
    <d2l-text-input></d2l-text-input>
</d2l-label>

Not sure that'll work, but if inside <d2l-label> it renders an actual <label> element, it might.

  1. Make the label part of this component

Like this: <d2l-text-input label="label for input">. We'd then need to handle various different kinds of labels eventually -- above, beside, etc. Probably needs more thought around how this can be shared across many different kinds of inputs.

@dbatiste @pbrown-d2l

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.