The European Commission who issued the directive was not democratically elected, as no European government is in a parliamentary system, but the directive was approved by the European Parliament, which was democratically elected. Besides, the directive will have to be turned into (national) legislation by all national parliaments of the EU member states, which are all democratically elected.